2017年11月28日

获取别的页面上的一个或者少数的数据

摘要: '<td onclick="todo(val)">'+"val为传导的数据"+'</td>' function todo(val) { window.location.href = "./bing.html?id=" + val;} 打开bing页面,网址栏或得到id之后的val传的值 functi 阅读全文

posted @ 2017-11-28 17:05 大力水手和超级玛丽 阅读(94) 评论(0) 推荐(0) 编辑

2017年11月17日

得到url之后的值

摘要: //url的值 var url="https://www.baidu.com/s?wd=%E4%BD%A0%E5%A5%BD&rsv_spt=1&rsv_iqid=0xd02bf63f0000d0c1&issp=1&f=8&rsv_bp=1&rsv_idx=2&ie=utf-8&rqlang=cn&tn=baiduhome_pg&rsv_enter=1&oq=window.location.se... 阅读全文

posted @ 2017-11-17 00:04 大力水手和超级玛丽 阅读(84) 评论(0) 推荐(0) 编辑

2017年11月1日

jQuery 基本事件

摘要: // 向被选定的元素添加一个或者多个事件处理数据,以及当事件发生时运行的函数 $(this).bind("click",function(){ }) $(this).bind("mouseover mouseout",function(){\ }) // event必填,多个事件用空格分开(必须是有效事件) // data 可选,规定传输函数额外的数据 // ... 阅读全文

posted @ 2017-11-01 15:45 大力水手和超级玛丽 阅读(99) 评论(0) 推荐(0) 编辑

2017年10月17日

jQuery 遍历

摘要: // 返回被选元素的直接父元素 $(this).parent() // 返回被选元素所有的祖先元素 $(this).parents() // 返回被选元素祖先为"ul"元素 $(this).parents("ul... 阅读全文

posted @ 2017-10-17 10:02 大力水手和超级玛丽 阅读(105) 评论(0) 推荐(0) 编辑

2017年10月16日

jQuery HTML

摘要: // 在被选元素的结尾插入内容 $(this).append() // 在被选元素的开头插入内容 $(this).prepend() // 在被选元素之后插入内容 $(this).after() // ... 阅读全文

posted @ 2017-10-16 17:22 大力水手和超级玛丽 阅读(133) 评论(0) 推荐(0) 编辑

jQuery 基本效果

摘要: // 隐藏 $(this).hide() // 显示 $(this).show() // 隐藏和显示 切换 (speed时间可以自定义) $(this).toggle() // 淡入 $(this).fadeI... 阅读全文

posted @ 2017-10-16 13:57 大力水手和超级玛丽 阅读(115) 评论(0) 推荐(0) 编辑

2017年9月27日

判断body的高度,安排footer position具体的样式

摘要: heights() function heights(){ if ($(document.body).height() > 700) { $("#footer").css("position", "static") console.log("static") } else { $("#... 阅读全文

posted @ 2017-09-27 23:15 大力水手和超级玛丽 阅读(92) 评论(0) 推荐(0) 编辑

2017年9月25日

socket

摘要: 与后台连接 获取之后得到datas 后台具体传输什么数据,看具体情况而定,接口通了之后就差不多OK了 阅读全文

posted @ 2017-09-25 23:42 大力水手和超级玛丽 阅读(127) 评论(0) 推荐(0) 编辑

局部刷新

摘要: 所谓局部刷新,说到底是“接口”的刷新,简单的做法是用“setInterval()”,循环刷新 阅读全文

posted @ 2017-09-25 23:36 大力水手和超级玛丽 阅读(93) 评论(0) 推荐(0) 编辑

导航