此帖为jquery
经常使用技巧总结贴,记录开发中遇到的各类经常使用技巧。javascript
$(document).ready(function(){
$(document).bind("contextmenu",function(e){
return false;
});
});
$(document).ready(function() {
//例子1: href=”http://”的超连接将会在新窗口打开连接
$('a[href^="http://"]').attr("target", "_blank");
//例子2: rel="external"的超连接将会在新窗口打开连接
$("a[rel$='external']").click(function(){
this.target = "_blank";
});
});
div
也能够跳转div
在屏幕中央Ajax
参数