随笔 - 669  文章 - 0  评论 - 56  阅读 - 320万

随笔分类 -  html-javascript

js如何在指定页面跳转到另一指定页面
摘要:第一种:(跳转到b.html) <script language="javascript" type="text/javascript"> window.location.href="b.html"; </script> 第二种:(返回上一页面) <script language="javascri 阅读全文
posted @ 2019-12-12 15:53 adolfmc 阅读(6482) 评论(0) 推荐(0) 编辑
js获取客户端time,cookie,url,ip,refer,user_agent信息:
摘要:<script src="http://pv.sohu.com/cityjson?ie=utf-8"></script> <script type="text/javascript">window.onload=function(){ gettime(); //js获取当前时间 getip(); / 阅读全文
posted @ 2017-10-20 10:55 adolfmc 阅读(2953) 评论(0) 推荐(0) 编辑
正则表达式
摘要:email和数字,字母,下划线还有汉字的正则表达式 关键字: 正则表达式 email 数字 字母 下划线 汉字 自己总结的正则表达式:绝对正确的,本人已经验证通过了。 Java代码 1. 只有字母、数字和下划线且不能以下划线开头和结尾的正则表达式:^(?!_)(?!.*?_$)[a-zA-Z0-9_ 阅读全文
posted @ 2017-09-13 08:12 adolfmc 阅读(621) 评论(0) 推荐(0) 编辑
正则表达式 匹配中文,英文字母和数字及_的写法!同时控制长度
摘要:匹配中文:[\u4e00-\u9fa5]英文字母:[a-zA-Z]数字:[0-9]匹配中文,英文字母和数字及_:^[\u4e00-\u9fa5_a-zA-Z0-9]+$同时判断输入长度:[\u4e00-\u9fa5_a-zA-Z0-9_]{4,10}^[\w\u4E00-\u9FA5\uF900-\... 阅读全文
posted @ 2015-09-20 11:41 adolfmc 阅读(1247) 评论(0) 推荐(0) 编辑
js 跨域问题
摘要:1js同源策略http://www.cnblogs.com/dsky/archive/2012/04/06/2434010.html思考为什么js要引入同源安全机制2如何绕开同源策略http://www.nowamagic.net/librarys/veda/detail/224出常规几种方案外,能... 阅读全文
posted @ 2015-07-20 18:51 adolfmc 阅读(169) 评论(0) 推荐(0) 编辑
Jquery实际应用,判断radio,selelct,checkbox是否选中及选中的值
摘要:jquery取radio单选按钮的值 $("input[name='items']:checked").val(); 另:判断radio是否选中并取得选中的值 如下所示: function checkradio(){ var item = $(":radio:checked"); var len=item.length; if(len>0){ alert("yes--选中的值为:"+$(":radio:checked").val()); } } jquery radio取值,checkbox取 阅读全文
posted @ 2012-10-25 11:40 adolfmc 阅读(4163) 评论(0) 推荐(0) 编辑
JavaScript 定义类
摘要:http://www.cnblogs.com/mrzzcn/archive/2012/10/19/jsclass.html在javascript中定义类或对象有下面几种常用的方式:工厂方式functioncreateCar(color,doors,mpg){vartempCar=newObject;tempCar.color=color;tempCar.doors=doors;tempCar.mpg=mpg;tempCar.showColor=function(){alert(this.color);};returntempCar;}varcar1=createCar("red&qu 阅读全文
posted @ 2012-10-20 14:52 adolfmc 阅读(210) 评论(0) 推荐(0) 编辑

< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5

点击右上角即可分享
微信分享提示