在经历了对ext的震惊、追随、遗憾而放弃后,决定还是先研究一下jQuery吧。
jQuery的特点:
体积小,发布的产品只有29K
jQuery适合情形:
快速的Dom和Ajax操作,一些基本的动画效果
jQuery启程:
快速载入javascript的便捷方式 ${document}.ready(function(){//do something });
伪装链接
<a onMouseOver='window.status="http://www.merchant-url-here.com";
return true;' onMouseOut='window.status="Done"; return true;'
href="http://www.affiliate-url-here.com"
target="_blank">Link Text Here</a>
jQuery实现:
<p><a href="http://www.affsite.com?id=123" title="http://www.affsite.com"
class="affLink">Super Duper Product</a></p>
告诉jQuery找到有class=“affLink”的链接
$('a.affLink')
$('a.affLink').mouseover(function(){window.status=this.title;return true;})
.mouseout(function(){window.status='Done';return true;});
http://wiki.jquery.org.cn/doku.php