上一页 1 ··· 4 5 6 7 8 9 下一页
摘要: 设置定时器 t=setTimeout(function(){ document.write('你好'); alert(2000); },2000); 清除定时器 clearTimeout(t); 多次执行定时器,执行10次 function fun(){ if(i>10){ clearTimeout 阅读全文
posted @ 2018-04-22 11:30 ksy_c 阅读(102) 评论(0) 推荐(0)
摘要: 三种显示方法,括号里放时间 $('#my').show(1000); $('#my').fadeIn(1000); $('#my').slideDown(1000); 三种隐藏方法 $('#my').hide(1000); $('#my').fadeOut(1000); $('#my').slide 阅读全文
posted @ 2018-04-22 11:23 ksy_c 阅读(109) 评论(0) 推荐(0)
摘要: js $('.img').click(function(){ $(this).parent().children('img').attr('src','./images/images.php?id='+Math.random()); }) js $('.img').click(function(){ 阅读全文
posted @ 2018-04-21 16:24 ksy_c 阅读(121) 评论(0) 推荐(0)
摘要: HTML 我们的页面上有一个歌曲列表,列出多行歌曲名称,并匹配复选框供用户选择,并且在列表下方有一排操作按钮。 <ul id="list"> <li><label><input type="checkbox" value="1"> 1.时间都去哪儿了</label></li> <li><label> 阅读全文
posted @ 2018-04-21 16:13 ksy_c 阅读(463) 评论(0) 推荐(0)
摘要: $.ajax({ url:"../api/user.api.php", dataType:"html", data:{sub:val}, type:"get", success:function(data){ alert(data); } }) $.get( '../api/user.api.php 阅读全文
posted @ 2018-04-21 15:05 ksy_c 阅读(73) 评论(0) 推荐(0)
摘要: <div class="select"> <input type="checkbox" name="" id="all"><span>全选</span> <br> <input type="checkbox" name="" id=""> <input type="checkbox" name="" 阅读全文
posted @ 2018-04-20 16:31 ksy_c 阅读(176) 评论(0) 推荐(0)
摘要: a = $('#form').serialize(); 获取#form表单里面内容以字符串形式存储为a arr = $('#form').serializeArray(); 获取#form表单里面内容以数组形式存储为arr $.post('demo2.php',{name:a},function(d 阅读全文
posted @ 2018-04-20 11:44 ksy_c 阅读(204) 评论(0) 推荐(0)
摘要: Cookies 定义:让网站服务器把少量数据储存到客户端的硬盘或内存,从客户端的硬盘读取数据的一种技术; 下载与引入:jquery.cookie.js基于jquery;先引入jquery,再引入:jquery.cookie.js;下载:http://plugins.jquery.com/cookie 阅读全文
posted @ 2018-04-20 11:06 ksy_c 阅读(123) 评论(0) 推荐(0)
摘要: 恢复内容开始 载入执行 $(document).ready(function(){ alert('jquery!'); }) function test(){ alert('111'); } $(test); 等同于 $(document).ready(test()); 等同于 $(document 阅读全文
posted @ 2018-04-19 16:07 ksy_c 阅读(74) 评论(0) 推荐(0)
摘要: 按钮: <button class="btn btn-success" value="成功">success</button> <button class="btn btn-default" href="#" role="button">default</button> <button class= 阅读全文
posted @ 2018-04-17 09:25 ksy_c 阅读(98) 评论(0) 推荐(0)
上一页 1 ··· 4 5 6 7 8 9 下一页