Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

JavaScriptʹÓÃÕýÔò±í´ïʽ½øÐÐÑéÖ¤

ʹÓõÄÕýÔò±í´ïʽµÄÀý×Ó£¬µ«ÊÇûÓÐ˵ÕâЩÕýÔò±í´ïʽÈçºÎʹÓã¬ÏÖÔÚ¸ø´ó¼Ò¼¸¸öÀý×Ó£¬´ó¼Ò¿ÉÒÔ¿´¿´¡£
ÀûÓÃÕýÔò±í´ïʽÅжÏÊÇ·ñÊÇ0-9µÄ°¢À­²®Êý×Ö
function regIsDigit(fData)
{
var reg = new RegExp("^[0-9]$");
return (reg.test(fData));
}
ÀûÓÃÕâÔò±í´ïʽ»ñÈ¡×Ö·û´®µÄ³¤¶È
function regDataLength(fData)
{
var valLength = fData.length;
var reg = new RegExp("^[\u0391-\uFFE5]$");
var result = 0;
for(i=0; i< valLength; i++)
{
if(reg.test(fData.charAt(i)))
{
result += 2;
}
else
{
result ++;
}
}
return result;
}
 Ó¦ÓÃÀ©Õ¹ÅжÏÊÇ·ñÊÇÊýÖµ
function regIsNumber(fData)
{
var reg = new RegExp("^[-]?[0-9]+[\.]?[0-9]+$");
return reg.test(fData)
}

ÑéÖ¤EmailÊÇ·ñÕýÈ·
function regIsEmail(fData)
{
var reg = new RegExp("^[0-9a-zA-Z]+@[0-9a-zA-Z]+[\.]{1}[0-9a-zA-Z]+[\.]?[0-9a-zA-Z]+$");
return reg.test(fData);
}
 ÅжÏÊÖ»úºÅÊÇ·ñÕýÈ·£º
  function regIsPhone(fData)
{
var reg = /^(\+86)?(1[0-9]{10})$/;
return reg.test(fData);
}
ת×Ô£ºhttp://www.ijavascript.cn/yanzheng/use-the-regular-for-javascript-validate-23.html


Ïà¹ØÎĵµ£º

JavaScript »ñÈ¡¶ÔÏóµÄ¸ß¶ÈºÍ¿í¶ÈÏêϸ˵Ã÷

scrollHeight: »ñÈ¡¶ÔÏóµÄ¹ö¶¯¸ß¶È¡£
scrollLeft:ÉèÖûò»ñȡλÓÚ¶ÔÏó×ó±ß½çºÍ´°¿ÚÖÐÄ¿Ç°¿É¼ûÄÚÈݵÄ×î×ó¶ËÖ®¼äµÄ¾àÀë
scrollTop:ÉèÖûò»ñȡλÓÚ¶ÔÏó×¶ËºÍ´°¿ÚÖпɼûÄÚÈݵÄ×¶ËÖ®¼äµÄ¾àÀë
scrollWidth:»ñÈ¡¶ÔÏóµÄ¹ö¶¯¿í¶È
offsetHeight:»ñÈ¡¶ÔÏóÏà¶ÔÓÚ°æÃæ»òÓɸ¸×ø±ê offsetParent ÊôÐÔÖ¸¶¨µÄ¸¸×ø±êµÄ¸ß¶È
offsetL ......

JavascriptµÄÊý×éÏà¹Ø֪ʶ

1.ÈÏʶÊý×é
Êý×é¾ÍÊÇijÀàÊý¾ÝµÄ¼¯ºÏ£¬Êý¾ÝÀàÐÍ¿ÉÒÔÊÇÕûÐÍ¡¢×Ö·û´®¡¢ÉõÖÁÊǶÔÏó
Javascript²»Ö§³Ö¶àάÊý×飬µ«ÊÇÒòΪÊý×éÀïÃæ¿ÉÒÔ°üº¬¶ÔÏó£¨Êý×éÒ²ÊÇÒ»¸ö¶ÔÏ󣩣¬ËùÒÔÊý×é¿ÉÒÔͨ¹ýÏ໥ǶÌ×ʵÏÖÀàËƶàάÊý×éµÄ¹¦ÄÜ
1.1 ¶¨ÒåÊý×é
ÉùÃ÷ÓÐ10¸öÔªËصÄÊý×é
var a = new Array(10);
´ËʱΪaÒѾ­¿ª±ÙÁËÄÚ´æ¿Õ¼ä£¬°üº¬10¸öÔªËØ ......

javascript»ñµÃurlÖеIJÎÊý

function GetUrlParms(){
var args=new Object();
var query=location.search.substring(1);//»ñÈ¡²éѯ´®
var pairs=query.split("&");//ÔÚ¶ººÅ´¦¶Ï¿ª
for(var i=0;i<pairs.length;i++){
var pos=pairs[i].indexOf('=');//²éÕÒname=value
if(pos==-1) c ......

Ó¦ÓÃ×î¹ãµÄÊ®´óJavascript¿ò¼Ü

½üÈÕ£¬ÖªÃû¼¼Êõ¿ª·¢ÍøÕ¾SYS-CON ýÌåÁгöÊ®¸öÓ¦ÓÃ×î¹ãµÄJavascript¿ò¼Ü£¬ÎÄÕÂ˵£¬Javascript¿âÒѾ­³ÉΪÉè¼ÆÓÅÐãÍøÕ¾µÄ»ù´¡£¬µ±½ñ¼¸ºõËùÓÐÕ¾µã¶¼´øÓÐJavascript»òAjaxÔªËØ¡£ÔÚWeb2.0¿ª·¢´ó³±ÖУ¬ËüÒ²ÐíÊÇ×î¹Ø¼üµÄÒªËØ¡£
ÒÔÏÂÊ®¸öÊ®´óJavascript¿ò¼Ü£¬Äã³£ÓÃÆäÖеļ¸¸ö£¿
1. script.aculo.us (http://script.aculo.us/)
UR ......

¡¾×ª¡¿javascript IEϵĹرÕie´°¿Ú³öÏÖÌáʾ¹Ø±ÕÎÊÌâ

ÔÚ¿ª·¢Öо­³£»áÓÐÖ±½Ó¹Ø±ÕÒ³Ãæ²»µ¯³öÈκÎÌáʾµÄÐèÇó£¬ÔÚIE6ÖпÉÒÔÖ±½ÓÏóÏÂÃæÕâÑùд¾Í¿ÉÒÔÁË
<mce:script language=javascript><!--
window.opener=null
window.close()
// --></mce:script>
Õâ¸öÎÊÌâÔÚIE7ÖÐÔòÓпÉÄÜÊdzöÓÚijÖÖ°²È«¿¼ÂÇ£¨ÒòΪÔÚMSä¯ÀÀÆ÷µÄ¾ºÕù¶ÔÊÖFFÖУ¬ÊDz»Äܹرշ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ