![](https://img-blog.csdnimg.cn/20201014180756930.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
js
penjian
这个作者很懒,什么都没留下…
展开
-
常用正则表达式
<br />常用正则表达式速查: 只能输入数字:"^[0-9]*$"。 只能输入n位的数字:"^/d{n}$"。 只能输入至少n位的数字:"^/d{n,}$"。 只能输入m~n位的数字:。"^/d{m,n}$" 只能输入零和非零开头的数字:"^(0|[1-9][0-9]*)$"。 只能输入有两位小数的正实数:"^[0-9]+(.[0-9]{2})?$"。 只能输入有1~3位小数的正实数:"^[0-9]+(.[0-9]{1,3})?$"。 只能输入非零的正整数原创 2011-05-27 16:14:00 · 276 阅读 · 0 评论 -
js对象应用之团购时间倒计时
<br /><mce:script type="text/javascript"><!-- //服务器时间 var service_time=<?php echo $now_time; ?>; function showTime(tuanid,time_distance){ this.tuanid = tuanid; //PHP时间是秒,JS时间是微秒 this.time_distance = time_distance*1000; } showTime.proto转载 2011-05-27 16:06:00 · 1285 阅读 · 0 评论 -
关于js中window.location.href, location.href, parent.location.href
<br />"window.location.href"、"location.href"是本页面跳转 <br /><br />"parent.location.href"是上一层页面跳转 <br /><br />"top.location.href"是最外层的页面跳转 <br /><br />举例说明: <br /><br />如果A,B,C,D都是jsp,D是C的iframe,C是B的iframe,B是A的iframe,如果D中js这样写 <br /><br />"window.location.href转载 2011-05-27 16:32:00 · 523 阅读 · 0 评论