js实现鼠标拖拽效果
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xm...
jq,js获得当前时间戳
javascript 中使用new Date().getTime()方法new Date().getTime()IE8 以上版本可以使用 直接使用Date.now()方法//IE8以下版本if (!Date.now) { Date.now = funct...
js判断undefined类型,是否为undefined类型
undefined判断方法:if (typeof(val) == "undefined") { alert("undefined"); }typeof 返回的是字符串类型:"number"、"s...
radio被选中的值,radio点击文字选中,jq操作radio
jq获取radio的选中值,radio点击后面文字,选中单选按钮<script src="http://libs.baidu.com/jquery/1.9.0/jquery.js"></script> &nb...
jq中对动态生成的标签不会响应click事件
Jquery中对ajax动态生成的html标签不会响应 $(selector).click(function.. 或者$(selector).bind('click',function.., 需要用.livejQuery 1.7 开始,不再建议使用 .live() 方法。请使用 .on() 来添加事件处...
js刷新页面,meta刷新页面,自动刷新,自动跳转
js刷新页面方法history.go(0) location.reload() location=location location.assign(location) document.execCommand('Refresh') window.navigate(location) lo...
jq加速地址,jq的CDN加速地址,百度CDN
jQuery的一些CDN加速包百度CDN地址支持的版本: 2.0.3, 2.0.2, 2.0.1, 2.0.0, 1.10.2, 1.10.1, 1.10.0, 1.9.1, 1.9.0, 1.8.3, 1.8.2, 1.8.1, 1.8.0, 1.7.2, 1.7.1, 1.7.0, 1.6.4, 1.6.3, 1.6.2, 1.6.1, 1.6.0, 1.5.2...
js监控确认键,提交,jq监控enter键提交,监控回车键
js监控确认键,提交,jq监控enter键提交,监控回车键$(document).keypress(function(e) { if (e.which == 13) loginfun(); });
网页中JS函数自动执行常用方法
js页面载入执行代码<script type="text/javascript"> function autoRun(){ alert("自动执行代码"); &n...
jq判断邮箱格式,jq常用方法判断邮箱格式
在这里提供几个常用的邮箱判断的方法,以供大家相互学习function ischeck(){ var companyemail = document.getElementById("companyemail").value; &n...
checkbox选中取消选中checked
在一些效果的时候,我们需要在checkbox的外层点击选中,下面代码给大家参考,可以灵活应用,主要是方法,也可以分享你的更好的实现方法.checkbox 去除选中checkbox 选中$(".push_box li").click(function(...
Cannot read property ‘msie’ of undefined
由于browser等api操作在jQuery1.9里被删除了jquery推出了一个新插件jQuery Migration,该插件可以检查出在1.9之后被废弃或者删除的API,恢复原有功能,从而保证已有的js代码能在最新的jQuery下正常运行。<script&...