³£ÓÃÕýÔò±í´ïʽ,³£ÓÃ±íµ¥ÑéÖ¤javascript´úÂë
function f_MobilCheck(as_SourceString)
{
if(as_SourceString.match(/^13[0-9]{9}$/g)) return true; //ÊÖ»úºÅΪ13¿ªÍ·µÄ11λÊý×Ö
else if(as_SourceString.match(/^[0]{1}[0-9]{2,3}[2-8]{1}[0-9]{5,7}$/g)) return true;¡¡¡¡//СÁéͨΪ0¿ªÍ·µÄ3-4λµÄÇøºÅ£«²»ÒÔ1ºÍ9¿ªÍ·µÄ6£8λÊý×Ö
return false;
}
//--------ÇëÐÂÔöº¯Êýʱ¼Ó×¢ÊÍ£¬¾¡Á¿½«Í¬ÀàµÄº¯Êý·ÅÔÚÒ»Æð£¬±ãÓÚ²éÕÒ¡£------Label_NameÔÊÐíΪ¿Õ£¬ÔÚÌáʾÓëÊäÈë¿ò·ÖÀëʱʹÓá£--------
//-------------------------------------------ɾ³ý×Ö·û´®×ó¿Õ¸ñ£¨°üÀ¨È«½Ç¿Õ¸ñ£©----------------
function f_PubStrLTrim(as_SourceString)
{
return as_SourceString.replace(/^[\s¡¡]*/,"");
}
//-------------------------------------------ɾ³ý×Ö·û´®ÓÒ¿Õ¸ñ£¨°üÀ¨È«½Ç¿Õ¸ñ£©-----------------
function f_PubStrRTrim(as_SourceString)
{
return as_SourceString.replace(/[\s¡¡]*$/,"");
}
//-------------------------------------------ɾ³ý×Ö·û´®×óÓÒ¿Õ¸ñ£¨°üÀ¨È«½Ç¿Õ¸ñ£©----------------
function f_PubStrTrim(as_SourceString)
{
return f_PubStrRTrim( f_PubStrLTrim(as_SourceString));
}
//-------------------------------------------ɾ³ý×Ö·û´®µÄÈ«²¿¿Õ¸ñ£¨°üÀ¨È«½Ç¿Õ¸ñ£©-----------------
function f_PubStrTrimAll(as_SourceString)
{
return as_SourceString.replace(/[\s¡¡]*/g,"");
}
//---------------------------------------------ÑéÖ¤ÊÇ·ñºÏ·¨µÄµç×ÓÓÊÏ䵨ַ----ºÏ·¨£ºtrue---²»ºÏ·¨£ºfalse---------
function f_EmailCheck(as_SourceString)
{
return as_SourceString.match(/^([\w-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([\w-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$/g);
}
//----------------------------------------------ÑéÖ¤ÊÇ·ñ²»º¬ÓзǷ¨µÄ×Ö·û--²»º¬ÓУ¬¼´ºÏ·¨£ºtrue---²»ºÏ·¨£ºfalse-------------
function f_StringCheck(as_SourceString)
{
//·Ç·¨×Ö·û--£¨Ë«¼õºÅ£©/*£¨Ð±¸ÜÐǺţ©'£¨µ¥ÒýºÅ£©;£¨·ÖºÅ£©"£¨Ë«ÒýºÅ£©%£¨°Ù·ÖºÅ£©<£¨×ó¼âÀ¨ºÅ£©>£¨ÓÒ¼âÀ¨ºÅ£©
if(as_SourceString.match(/\/\*|-{2}|[';"%<>]+/)) return false;
else return true;
}
//------------------------------
Ïà¹ØÎĵµ£º
ͨ¹ýxmlhttp+webservice(Ôʼ·½·¨)
ÔÎĵØÖ·:http://netboy.cnblogs.com/archive/2006/02/18/333260.html
view plaincopy to clipboardprint?
using System;
using System.Web;
using System.Web.Services;
using System.Web.Services.Protocols;
  ......
·µ»ØÒ»¸ö¸ø¶¨idÊôÐÔÖµµÄÔªËØ½ÚµãµÄ¶ÔÏó
document.getElememtById(id)
·µ»ØÒ»¸ö°üº¬ËùÓиø¶¨±êÇ©µÄÔªËØµÄÊý×é
document.getElementsByName(tag)
»ñÈ¡ÔªËØÊôÐÔ
document.getAttribute(attribute)
ÉèÖÃÔªËØÊôÐÔÖµ
document.setAttribute(attribute)
......
×ªÔØ×Ô£ºhttp://www.zipeng.info/archives/ppk-on-js-events.html
½ñÌìÎÒ»á˵һЩ¹ØÓÚJavaScriptʼþµÄÊÂÇ飬ÎÒºÜÏ£Íû×Ô¼ºÄÜÆô·¢´ó¼ÒһЩʲô£¬²»¹ý´ó»ï¶¼ÊǸßÊÖ£¬²»¹ÜÔõô£¬ÎÒ»¹ÊÇҪ˵˵
JavaScriptʼþ¡£
´óÔ¼Ò»ÄêǰÎÒ´òËã¶ÔJavaScriptµÄʼþ×öһЩÉîÈëµÄÑо¿£¬²¢ÇÒÎÒ×öÁËÒ»ÕżæÈÝÐÔµÄ±í£¬´ó¼Ò¿ÉÒÔͨ¹ýÏÂÃæÕâÀïÀ´
·ÃÎ ......
Ò»¡¢document.formName.item(“itemName”) ÎÊÌâ
ÎÊÌâ˵Ã÷£ºIEÏ£¬¿ÉÒÔʹÓà document.formName.item(“itemName”) »ò document.formName.elements ["elementName"]£»FirefoxÏ£¬Ö»ÄÜʹÓÃdocument.formName.elements["elementName"]¡£
½â¾ö·½·¨£ºÍ³Ò»Ê¹ÓÃdocument.formName.elements["elementName" ......