作者phycomp (samuel)
看板Ajax
标题Re: [ js ] 请问这段jquery语法哪里错?
时间Sat May 22 17:31:47 2010
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="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