超链接标签的一点区别

1.首先<a/>是通用html标准标签,只能通过href超链接,<html:link/>是struts标签库中的标签,不光可以用href,还可以通过action超链接。

2.<a/>中可以使用<bean:write/>,如<a href=’url?filename=<bean:write name=”row” property=”NAME”/>’ />,但<html:link/>不能用。

3.在设定了页面编码是GBK,并设有对所有请求GBK字符集过滤的时候,并要传递中文参数时,使用<a href=’url?filename=<bean:write name=”row” property=”NAME”/>’ />能够正常显示中文,而用<html:link href=”url” paramId=”filename” paramName=”row” paramProperty=”NAME” />在页面会显示utf-8编码,如果这样传递到后台servlet,需要先进行编码转化:
String filename = request.getParameter(“filename”);
filename = new String(filename.getBytes(“GBK”),”utf-8″);
一般情况这样也没问题,但如果遇到特殊中文字符就有可能会有无法识别的问题,如传递“作者”,传递的“url?filename=YB_1001_%E4 %BD%9C%E8%80%85_TJB.DOC”,就转化出错,不知道url unicode编码问题,还是java中String处理问题。

所以一般情况使用<a/>,用action时才使用<html:link/>比较好。

5人评论了“超链接标签<a>和<html:link/>的一点区别”

  1. pgslot เว็บตรง เกมส์สล็อตออนไลน์ เกมยอดนิยมจากผู้เล่นทั้งโลกตอนนี้ การเล่นสล็อตของคุณจะไม่มีเบื่ออีกต่อไป pg slot ขอแนะนำให้มาเล่นกับเว็บเรามีทางเลือกทั้งเกมเเละโปรโมชั่น

  2. โอปป้าจัง

    เว็บสล็อตเเตกง่าย ambbet.bar เว็บใหญ่มาแรง เล่นเกมสล็อตออนไลน์ทุกค่าย เกมสล็อตลิขสิทธิ์แท้ 100% บน เเพลตฟอร์ที่ดีที่สุด Ambbet เสถียร ลื่นไหล ไม่เด้ง ไม่หลุด เกมสล็อไม่ผ่านเอเย่นต์ เเตกง่ายได้เงินจริง โดยผู้เล่นสามารถถอนเงินได้ทุกยอด ด้วยระบบ ฝาก-ถอน AUTO เพลิดเพลินตลอดการเล่นเกม กับเกมสล็อต 3D รูปแบบโดดเด่น ไม่ซ้ำใคร เราพร้อมบริการ 24 ชั่วโมง.

  3. Find a xo สล็อต website that offers free credit bonuses. Play the game and see results as quickly as possible. We understand that every player who plays slot games They all want to own a big bonus. but how good If you have spun slots Without having to use your own capital at all Or use very little if there is a great item like a free credit bonus. Helper to make money. Very satisfying. Create an opportunity to make money without depositing money first. It helps to save capital more than doubled. Want to know the SLOTXO website that actually gives away free credit? When you win and don’t have to return, which website is it? This article has answers. Believe that anyone would want to bet on slot games. And they were all successful. So many people try Find a website that offers free credit bonuses. Play the game and see results as quickly as possible. for the opportunity to generate revenue and save your own funds Today we are going to share 3 of the most popular slots websites. that give away free credit in a landslide Once you win, you can’t return it, you can withdraw it, the conditions are minimal.

  4. ทางเข้าเล่น slotxo เว็บเกมออนไลน์ยอดนิยมคือเว็บอะไร ไม่แปลกที่หลายๆ คนจะถามคำถามนี้อยู่บ่อยๆ นั้นก็เป็นเพราะปัจจุบันมีเกมรูปแบบออนไลน์ออกมาให้เลือกเล่นมากมาย โดยเฉพาะเกมเดิมพัน ที่ซึ่งถือว่าได้รับความนิยมจากผู้เล่นเป็นอย่างมาก เพราะนอกจากจะได้ความสนุกแล้ว ผู้เล่นยังสามารถสร้างรายได้จากเกมเดิมพันออนไลน์ได้อีกด้วย และเกมที่กำลังมาแรงที่สูดในตอนนี้จะเป็นเกมไหนไปไม่ได้เลยนอกจากเกม SLOTXO ออนไลน์

发表评论

邮箱地址不会被公开。