随笔分类 - jquery
摘要:$("form").serialize() //可以获取整个表单中的value
阅读全文
摘要:JSON.stringify(list) 序列化JSON.parse(list) 反序列化
阅读全文
摘要://选择器//对下面代码进行input选择,分别循环取值10000次,测试浏览器firefox$(:input[name=i]) //执行时间 = 5353 毫秒$(input[name=i]) //执行时间 = 661 毫秒$('#i') //执行时间 = 213 毫秒document.getElementById("i"); //执行时间 = 9 毫秒(原生js威武)$('input') //执行时间 = 575 毫秒document.getElementsByTagName("input"); //执行时间 = 9
阅读全文
摘要:$(a).live('click',function(){ alert(1111)})live是作用与JS动态加入后的标签
阅读全文
摘要:一、调用citys里的3个js文件二、页面调用 <script type="text/javascript" src="<?=$C->SITE_URL?>js/jquery-1.8.0.min.js"></script><script src="<?=$C->SITE_URL?>js/jquery.doubleSelect.min.js"></script><script src="<?=$C->SITE_URL?>j
阅读全文
摘要:一、调用riqi.js文件二、页面调用 <select name=YYYY onchange="YYYYMM(this.value)"> <option value="">年</option></select><select name=MM onchange="MMDD(this.value)"> <option value="">月</option></select><select name=DD> <
阅读全文
摘要:一、调用jSelectDate.js文件二、页面调用 <script type="text/javascript"> $("body").ready(function(){ $("input.date").jSelectDate({ css:"date", yearBeign: 1995, disabled : true }); }) </script>三、input选项框调用 <body> <input type="text" id="txt
阅读全文
摘要:$(function(){ //-7375 var width = 125; var i = 48; //每版放4个图片 var left_width=width*i; $(".arrows2").click(function(){ //绑定click事件 var content = $("#slides_body"); var len=content.css('left'); if(!content.is(":a...
阅读全文
摘要:hide() 隐藏一个divshow() 现实一个div
阅读全文
摘要:自动滚动下载bxCarousel.js这个js插件 $('#demo1').bxCarousel({ display_num: 5, move: 1, auto: true, controls: false, margin: 105, auto_hover: true });
阅读全文
摘要:$(function(){ $(document).click(function(event){ alert('x:'+event.clientX+',y:'+event.clientY); //客户端横坐标和纵坐标 }) })
阅读全文
摘要:定位$(':input[name=put]')属性.val()获取内容//判断是否选中input$(':input[name=stel]').attr('checked')=='checked'
阅读全文
摘要:html页面:<script> $(function(){ function test(){ $url="xx.php"; comet=$.post($url,function(data){ if(data==null){ comet.abort(); //关闭之前的comet ajax请求 test(); //如果返回空则继续请求 return; } //$('#sub').append('<div>'+dat...
阅读全文
摘要:http://www.iiwnet.com/php_base/626.htmljqueryajax简便使用方法get方法:$.get($url,{uid:123456789,v:100},function(data){alert(data);},"json");post方法:$.post($url,{uid:123456789,v:100},function(data){alert(data);},"json");//技巧:my_data=escape(my_data)+"";//编码,防止汉字乱码
阅读全文

浙公网安备 33010602011771号