摘要: //search substring(start,end)截取字符串 slice(start,end)不包括end substr(start,length)后一个参数是长度 charAtvar str ='adfasdf'; //search查找的事下标 // alert(str.search('a 阅读全文
posted @ 2016-03-06 13:46 mingjixiaohui 阅读(200) 评论(0) 推荐(0) 编辑
摘要: 账号:<input type="text" id="username" /> 密码: <input type="password" id="pwd" /> <input type="checkbox" name="check" id="check" value=""/> 记住账号密码 <input 阅读全文
posted @ 2016-03-06 13:26 mingjixiaohui 阅读(281) 评论(0) 推荐(0) 编辑
摘要: <script> function setCookie(name,value,iDay) { var oDate = new Date(); oDate.setDate(oDate.getDate()+iDay) document.cookie = name +'='+ value +';expir 阅读全文
posted @ 2016-03-06 13:22 mingjixiaohui 阅读(166) 评论(0) 推荐(0) 编辑
摘要: <style type="text/css"> *{ margin:0; padding:0; } div{ float:left; } </style> 初始版 <script type="text/javascript"> var oBody = document.getElementsByTa 阅读全文
posted @ 2016-03-06 13:17 mingjixiaohui 阅读(350) 评论(0) 推荐(0) 编辑
摘要: <li>0000000</li> <li>11111111</li> <li>22222222</li> <li>33333333</li> script type="text/javascript"> var aLi = document.getElementsByTagName("li"); / 阅读全文
posted @ 2016-03-06 13:08 mingjixiaohui 阅读(496) 评论(0) 推荐(0) 编辑
摘要: <script> // var x = 0 ; // function a(){ // x++; // } // a();//没有结果 x++ // a();//没有结果 x++ // console.log(x);//2 // function a(){ // var x = 0; // x++; 阅读全文
posted @ 2016-03-06 13:04 mingjixiaohui 阅读(184) 评论(0) 推荐(0) 编辑
摘要: <script type="text/javascript"> window.onload = function(){ var oInp = document.getElementById("inp"); oInp.onclick = function(){ //获取text中的数据 // ajax 阅读全文
posted @ 2016-03-06 12:48 mingjixiaohui 阅读(412) 评论(0) 推荐(0) 编辑
摘要: ajax("get","1.get.php","username=jh&password=123",function(data){ // alert(data); var data = JSON.parse(data); }); // function ajax(method,url,data,fn 阅读全文
posted @ 2016-03-06 12:39 mingjixiaohui 阅读(164) 评论(0) 推荐(0) 编辑
摘要: *{ margin:0; padding:0; } #outer{ width:1000px; margin:0 auto; overflow:hidden; } #outer div{ width:250px; float:left; } #outer div img{ width:220px; 阅读全文
posted @ 2016-03-06 12:36 mingjixiaohui 阅读(233) 评论(0) 推荐(0) 编辑
摘要: <input type="text" id="inp"/> <ul id="wdList"> <li><a href=""></a></li> <li><a href=""></a></li> <li><a href=""></a></li> <li><a href=""& 阅读全文
posted @ 2016-03-06 11:48 mingjixiaohui 阅读(346) 评论(0) 推荐(0) 编辑