ï»??xml version="1.0" encoding="utf-8" standalone="yes"?>在线一区亚洲,国产视频网站一区二区三区,久久精品国产清高在天天线http://www.aygfsteel.com/senlin-blog/category/26920.htmlzh-cnThu, 17 Apr 2008 20:40:07 GMTThu, 17 Apr 2008 20:40:07 GMT60js校验常用æ–ÒŽ³•http://www.aygfsteel.com/senlin-blog/archive/2008/04/17/193817.html我的java生æ„Óæˆ‘çš„java生æ„ÓThu, 17 Apr 2008 09:31:00 GMThttp://www.aygfsteel.com/senlin-blog/archive/2008/04/17/193817.htmlhttp://www.aygfsteel.com/senlin-blog/comments/193817.htmlhttp://www.aygfsteel.com/senlin-blog/archive/2008/04/17/193817.html#Feedback0http://www.aygfsteel.com/senlin-blog/comments/commentRss/193817.htmlhttp://www.aygfsteel.com/senlin-blog/services/trackbacks/193817.htmlfunction ChkUtil() { }
//校验是否为空(先删除二边空格再验证)
ChkUtil.isNull = function (str) {
if (null == str ||  ""== str.trim()) {
  return true;
} else {
  return false;
}
};
//校验是否全是数字
ChkUtil.isDigit  = function (str) {
var patrn=/^\d+$/;
return patrn.test(str);
};
//校验是否是整�br />ChkUtil.isInteger = function (str) {
var patrn=/^([+-]?)(\d+)$/;
return patrn.test(str);
};
//校验是否为正整数
ChkUtil.isPlusInteger = function (str) {
var patrn=/^([+]?)(\d+)$/;
return patrn.test(str);
};
//æ ¡éªŒæ˜¯å¦ä¸ø™´Ÿæ•´æ•°
ChkUtil.isMinusInteger = function (str) {
var patrn=/^-(\d+)$/;
return patrn.test(str);
};
//校验是否为æÕQç‚ÒŽ•°
ChkUtil.isFloat=function(str){
var patrn=/^([+-]?)\d*\.\d+$/;
return patrn.test(str);
};
//校验是否为正‹¹®ç‚¹æ•?br />ChkUtil.isPlusFloat=function(str){
  var patrn=/^([+]?)\d*\.\d+$/;
  return patrn.test(str);
};
//æ ¡éªŒæ˜¯å¦ä¸ø™´Ÿ‹¹®ç‚¹æ•?br />ChkUtil.isMinusFloat=function(str){
  var patrn=/^-\d*\.\d+$/;
  return patrn.test(str);
};
//校验是否仅中�br />ChkUtil.isChinese=function(str){
var patrn=/[\u4E00-\u9FA5\uF900-\uFA2D]+$/;
return patrn.test(str);
};
//校验是否仅ACSII字符
ChkUtil.isAcsii=function(str){
var patrn=/^[\x00-\xFF]+$/;
return patrn.test(str);
};
//校验手机åïL 
ChkUtil.isMobile = function (str) {
var patrn = /^0?1((3[0-9]{1})|(59)){1}[0-9]{8}$/;
return patrn.test(str);
};
//校验电话åïL 
ChkUtil.isPhone = function (str) {
var patrn = /^(0[\d]{2,3}-)?\d{6,8}(-\d{3,4})?$/;
return patrn.test(str);
};
//校验URL地址
ChkUtil.isUrl=function(str){
var patrn= /^http[s]?:\/\/[\w-]+(\.[\w-]+)+([\w-\.\/?%&=]*)?$/;
return patrn.test(str);
};
//校验电邮地址
ChkUtil.isEmail = function (str) {
var patrn = /^[\w-]+@[\w-]+(\.[\w-]+)+$/;
return patrn.test(str);
};
//校验邮编
ChkUtil.isZipCode = function (str) {
var patrn = /^\d{6}$/;
return patrn.test(str);
};
//校验合法旉™—´
ChkUtil.isDate = function (str) {
  if(!/\d{4}(\.|\/|\-)\d{1,2}(\.|\/|\-)\d{1,2}/.test(str)){
    return false;
  }
  var r = str.match(/\d{1,4}/g);
  if(r==null){return false;};
  var d= new Date(r[0], r[1]-1, r[2]);
  return (d.getFullYear()==r[0]&&(d.getMonth()+1)==r[1]&&d.getDate()==r[2]);
};
//校验字符ä¸ÔŒ¼šåªèƒ½è¾“å…¥6-20个字母、数字、下划线(常用手校验用户名和密ç ?
ChkUtil.isString6_20=function(str){
var patrn=/^(\w){6,20}$/;
return patrn.test(str);
};



]]>
js中控制小数点的位æ•?/title><link>http://www.aygfsteel.com/senlin-blog/archive/2008/04/15/193075.html</link><dc:creator>我的java生æ„Ó</dc:creator><author>我的java生æ„Ó</author><pubDate>Tue, 15 Apr 2008 05:05:00 GMT</pubDate><guid>http://www.aygfsteel.com/senlin-blog/archive/2008/04/15/193075.html</guid><wfw:comment>http://www.aygfsteel.com/senlin-blog/comments/193075.html</wfw:comment><comments>http://www.aygfsteel.com/senlin-blog/archive/2008/04/15/193075.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.aygfsteel.com/senlin-blog/comments/commentRss/193075.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/senlin-blog/services/trackbacks/193075.html</trackback:ping><description><![CDATA[ <p> </p> <div style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee"> <img src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align="top" /> <span style="COLOR: #000000"><</span> <span style="COLOR: #000000">script language</span> <span style="COLOR: #000000">=</span> <span style="COLOR: #000000">"</span> <span style="COLOR: #000000">JScript</span> <span style="COLOR: #000000">"</span> <span style="COLOR: #000000">></span> <span style="COLOR: #000000"> <br /> <img src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align="top" />Number.prototype.toFixed</span> <span style="COLOR: #000000">=</span> <span style="COLOR: #000000">function(num)<br /><img id="Codehighlighter1_70_268_Open_Image" onclick="this.style.display='none'; Codehighlighter1_70_268_Open_Text.style.display='none'; Codehighlighter1_70_268_Closed_Image.style.display='inline'; Codehighlighter1_70_268_Closed_Text.style.display='inline';" src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedBlockStart.gif" align="top" /><img id="Codehighlighter1_70_268_Closed_Image" style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_70_268_Closed_Text.style.display='none'; Codehighlighter1_70_268_Open_Image.style.display='inline'; Codehighlighter1_70_268_Open_Text.style.display='inline';" src="http://www.aygfsteel.com/images/OutliningIndicators/ContractedBlock.gif" align="top" />   </span> <span id="Codehighlighter1_70_268_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"> <img src="http://www.aygfsteel.com/images/dot.gif" /> </span> <span id="Codehighlighter1_70_268_Open_Text"> <span style="COLOR: #000000">{<br /><img src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" align="top" />   </span> <span style="COLOR: #008000">//</span> <span style="COLOR: #008000">重新构造toFixedæ–ÒŽ³•,IE5.0+</span> <span style="COLOR: #008000"> <br /> <img src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" align="top" /> </span> <span style="COLOR: #000000">   with(Math)</span> <span style="COLOR: #0000ff">this</span> <span style="COLOR: #000000">.NO</span> <span style="COLOR: #000000">=</span> <span style="COLOR: #000000">round(</span> <span style="COLOR: #0000ff">this</span> <span style="COLOR: #000000">.valueOf()</span> <span style="COLOR: #000000">*</span> <span style="COLOR: #000000">pow(</span> <span style="COLOR: #000000">10</span> <span style="COLOR: #000000">,num))</span> <span style="COLOR: #000000">/</span> <span style="COLOR: #000000">pow(</span> <span style="COLOR: #000000">10</span> <span style="COLOR: #000000">,num);<br /><img src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" align="top" />   </span> <span style="COLOR: #0000ff">return</span> <span style="COLOR: #000000"> String(</span> <span style="COLOR: #000000">/</span> <span style="COLOR: #000000">\.</span> <span style="COLOR: #000000">/</span> <span style="COLOR: #000000">g.exec(</span> <span style="COLOR: #0000ff">this</span> <span style="COLOR: #000000">.NO)</span> <span style="COLOR: #000000">?</span> <span style="COLOR: #0000ff">this</span> <span style="COLOR: #000000">.NO:</span> <span style="COLOR: #0000ff">this</span> <span style="COLOR: #000000">.NO</span> <span style="COLOR: #000000">+</span> <span style="COLOR: #000000">"</span> <span style="COLOR: #000000">.</span> <span style="COLOR: #000000">"</span> <span style="COLOR: #000000">+</span> <span style="COLOR: #000000">String(Math.pow(</span> <span style="COLOR: #000000">10</span> <span style="COLOR: #000000">,num)).substr(</span> <span style="COLOR: #000000">1</span> <span style="COLOR: #000000">,num));<br /><img src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedBlockEnd.gif" align="top" />   }</span> </span> <span style="COLOR: #000000"> <br /> <img src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align="top" />alert((</span> <span style="COLOR: #000000">12.9299</span> <span style="COLOR: #000000">).toFixed(</span> <span style="COLOR: #000000">2</span> <span style="COLOR: #000000">));<br /><img src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align="top" />alert((</span> <span style="COLOR: #000000">12.9999</span> <span style="COLOR: #000000">).toFixed(</span> <span style="COLOR: #000000">2</span> <span style="COLOR: #000000">));<br /><img src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align="top" /></span> <span style="COLOR: #000000"></</span> <span style="COLOR: #000000">script</span> <span style="COLOR: #000000">></span> <span style="COLOR: #000000">  <br /><img src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align="top" /></span> </div> <img src ="http://www.aygfsteel.com/senlin-blog/aggbug/193075.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/senlin-blog/" target="_blank">我的java生æ„Ó</a> 2008-04-15 13:05 <a href="http://www.aygfsteel.com/senlin-blog/archive/2008/04/15/193075.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item></channel></rss> <footer> <div class="friendship-link"> <a href="http://www.aygfsteel.com/" title="狠狠久久亚洲欧美专区_中文字幕亚洲综合久久202_国产精品亚洲第五区在线_日本免费网站视频">狠狠久久亚洲欧美专区_中文字幕亚洲综合久久202_国产精品亚洲第五区在线_日本免费网站视频</a> </div> </footer> Ö÷Õ¾Ö©Öë³ØÄ£°å£º <a href="http://" target="_blank">ÖÐÑôÏØ</a>| <a href="http://" target="_blank">Ö¯½ðÏØ</a>| <a href="http://" target="_blank">ÀäË®½­ÊÐ</a>| <a href="http://" target="_blank">ÇìÔªÏØ</a>| <a href="http://" target="_blank">³üÖÝÊÐ</a>| <a href="http://" target="_blank">°²¶àÏØ</a>| <a href="http://" target="_blank">ÔúÂ³ÌØÆì</a>| <a href="http://" target="_blank">ÄþµÂÊÐ</a>| <a href="http://" target="_blank">Ô­ÑôÏØ</a>| <a href="http://" target="_blank">ºÏ´¨ÊÐ</a>| <a href="http://" target="_blank">ÁÙ¸ßÏØ</a>| <a href="http://" target="_blank">³¤É³ÏØ</a>| <a href="http://" target="_blank">ÉòÇðÏØ</a>| <a href="http://" target="_blank">Í­É½ÏØ</a>| <a href="http://" target="_blank">¶¨ÏåÏØ</a>| <a href="http://" target="_blank">ÍòÈÙÏØ</a>| <a href="http://" target="_blank">ÈéÔ´</a>| <a href="http://" target="_blank">µ¤ÀâÏØ</a>| <a href="http://" target="_blank">çÆÔÆÏØ</a>| <a href="http://" target="_blank">ÓÏÑô</a>| <a href="http://" target="_blank">Ç­Î÷ÏØ</a>| <a href="http://" target="_blank">Ì«ºþÏØ</a>| <a href="http://" target="_blank">ÀëµºÇø</a>| <a href="http://" target="_blank">½­ÓÍÊÐ</a>| <a href="http://" target="_blank">¼ÃÄþÊÐ</a>| <a href="http://" target="_blank">¿Æ¼¼</a>| <a href="http://" target="_blank">å´²ýÏØ</a>| <a href="http://" target="_blank">ÂåÑôÊÐ</a>| <a href="http://" target="_blank">ÎÚÇ¡ÏØ</a>| <a href="http://" target="_blank">³çÈÊÏØ</a>| <a href="http://" target="_blank">°×ÒøÊÐ</a>| <a href="http://" target="_blank">ͨ»¯ÊÐ</a>| <a href="http://" target="_blank">Á鱦ÊÐ</a>| <a href="http://" target="_blank">ƽÁ¹ÊÐ</a>| <a href="http://" target="_blank">°ÄÃÅ</a>| <a href="http://" target="_blank">ƽ²ýÏØ</a>| <a href="http://" target="_blank">ÓÀºÍÏØ</a>| <a href="http://" target="_blank">¹ÅÌïÏØ</a>| <a href="http://" target="_blank">Ì«ºÍÏØ</a>| <a href="http://" target="_blank">ÂÞÉ½ÏØ</a>| <a href="http://" target="_blank">ÐÇ×ÓÏØ</a>| <script> (function(){ var bp = document.createElement('script'); var curProtocol = window.location.protocol.split(':')[0]; if (curProtocol === 'https') { bp.src = 'https://zz.bdstatic.com/linksubmit/push.js'; } else { bp.src = 'http://push.zhanzhang.baidu.com/push.js'; } var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(bp, s); })(); </script> </body>