Re: [ js ] 請問這段jquery語法哪裡錯?

看板Ajax作者 (samuel)時間15年前 (2010/05/22 17:31), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串2/2 (看更多)
Dear yadis, i'd think that you can use the code such as follows, to have the jquery take effect as all the document read by browser. <html> .... <script language='javascript'> $(window).ready(init); function init() { $("a[@target*=]").append(" (Opens in New Window)"); } </script> .... <body> ... </body> </html> Please check the more detailed info at the official "jquery" site, referring to "jquery.com". Samuel ※ 引述《yadis (>"<)》之銘言: : 小弟最近剛開始摸jquery語法 : 請問以下這段語法哪裡有錯 : <html> : <head> : <title>test</title> : <script> : $("a[target]").append(" (Opens in New Window)"); : </script> : </head> : <body> : <a href="jsGears" rel="nofollow">http://jsgears.com">jsGears</a> : <a href="http://google.com" target="_blank">Google</a> : <a href="http://amazon.com" target="_blank">Amazon</a> : </body> : </html> : 這段程式碼是可以跑 : 可是沒辦法加入jquery的效果 : 請知道的大大幫幫忙 : 謝謝 -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 61.62.73.57
文章代碼(AID): #1BzwI6uM (Ajax)
討論串 (同標題文章)
文章代碼(AID): #1BzwI6uM (Ajax)