有时, 通过强大的jquery selectors 和 attributes 功能来获取成jquery对象, 来应用DOM对象的功能var a = $(':input[name^="events_"]:checked');//jquery对象var b = a[0];//DOM对象有时, 需要把DOM对象转成jquery对象var a = document.getElementById('msg'
var str=new Array('');for(......){ str.push(......);}return str.join('');
var options = { dataType: 'jsonp',  
js跳转window.location.href = ;js刷新 window.location.reload();与IE8或更高版本兼容:<META http-equiv="X-UA-Compatible" content="IE=EmulateIE7" /><bgsound id="oBGSound" autostart="true" loop="true" hidden="
一直喜欢用jQuery框架,简洁、方便、清晰,一行代码能实现以前四五行代码最近聊天室的ajax刷新,从服务器端tail文件的最后聊天内容,在某些pc上有问题,总是看不到新内容最后在options里加了一行属性cache:false, 就好了见 [url]http://docs.jquery.com/Ajax/jQuery.ajax#options[/url]
js 取当前时间戳(单位: 毫秒):var timestamp = Date.parse(new Date());或var timestamp = (new Date()).valueOf();window.location.hash = "#search"; //定位到锚链接var h = window.location.hash; //取锚链接字节长度(汉字字母兼容):String.proto
Copyright © 2005-2024 51CTO.COM 版权所有 京ICP证060544号