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

javascript º¯Êý ºÍ CustomValidator¿Ø¼þÏà½áºÏʹÓÃ

<asp:TextBox ID="txtPwdPrompt" runat="server"></asp:TextBox>
<asp:CustomValidator id="CVPwdPrompt" runat="server" ClientValidationFunction="CheckPwd" ControlToValidate="txtPwdPrompt" ErrorMessage="<span style='font:12px'>ÌáʾÎÊÌâ±ØÐëÔÚ2-50¸ö×Ö·ûÄÚ</span>" Display="None"></asp:CustomValidator>
Javascriptº¯Êý:
<script language="javascript" type="text/javascript">
function CheckPwd(source, arguments)
{
   if(arguments.Value.Length>2 || arguments.Value.Length < 50)
   {
     arguments.IsValid=true;
   }
   else
   {
     arguments.IsValid =false;
   }
}
</script>
º¯ÊýÓÐÁ½¸ö²ÎÊý:
source ²ÎÊýÊǶÔΪ CustomValidator ¿Ø¼þ³ÊÏÖµÄ <span> ÔªËصÄÒýÓá£Òò´Ë£¬Äú¿ÉÒÔ±à³ÌµÄ·½Ê½¿ØÖÆ <span> ±ê¼Ç£¬ÈçÐÞ¸Ä InnerHtml ÊôÐÔ¡£
arguments ²ÎÊýÊÇÒ»¸ö¾ßÓÐÒÔÏÂÁ½¸öÊôÐԵĶÔÏó£ºValue ºÍ IsValid¡£Ê¹Óô˲ÎÊý¿ÉÒÔ»ñÈ¡¿Ø¼þµÄÖµ£¬ÒÔ¸ù¾Ý×Ô¶¨ÒåÑéÖ¤Àý³ÌÑéÖ¤²¢Ö¸Ê¾¸ÃÖµÊÇ·ñÓÐЧ¡£
      ʹÓà ClientValidationFunction ÊôÐÔÖ¸¶¨Óë CustomValidator ¿Ø¼þ¹ØÁªµÄ¿Í»§¶ËÑéÖ¤½Å±¾º¯ÊýµÄÃû³Æ¡£ÓÉÓڸýű¾º¯ÊýÔÚ¿Í»§¶ËÖ´ÐУ¬Òò´Ë¸Ãº¯Êý±ØÐëʹÓÃÄ¿±êä¯ÀÀÆ÷Ö§³ÖµÄÓïÑÔ£¨Èç VBScript »ò JScript£©À´±àд¡£
Óë·þÎñÆ÷¶ËÑéÖ¤Ò»Ñù£¬¿ÉÒÔͨ¹ýʹÓà arguments ²ÎÊýµÄ Value ÊôÐÔÀ´·ÃÎÊÒªÑéÖ¤µÄÊäÈë¿Ø¼þÖеÄ×Ö·û´®¡£Í¨¹ýÉèÖà arguments ²ÎÊýµÄ IsValid ÊôÐÔ·µ»ØÑéÖ¤½á¹û¡£
×¢Òâ:ValueÊ××Öĸ±ØÐë´óд ......


Ïà¹ØÎĵµ£º

Àí½âjavascriptÖÐarguments,callee,caller


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
<html xmlns="http://www.w3.org/1999/xhtml" lang="gb2312"> 
<head> 
<head> 
<title> ¹ØÓÚarguments,callee,callerµÈµÄ²âÊÔ &l ......

³£ÓÃHTMLÒªÇó JavaScript½Å±¾

ÌØÊâJavaScript½Å±¾£º
1.½ûÓÃ(»Ö¸´)href³¬¼¶Á´½Ó£®
2.javascriptÖе÷ÓÃvbs¶Ô»°¿òʵÏÖConfirm,¿ÉÒÔÏÔʾYes,No,»¹Óи÷ÖÖͼ±ê£¬½öIEÏÂÓÐЧ£®
3.ÏÞÖÆÉÏ´«ÎļþÀàÐÍΪjpg.
4.ÏÞÖÆÀ뿪µ±Ç°Ò³Ã棬ÔÚÀ뿪ʱÌáʾ£®½öÏÞÖÆ´°¿Ú¹Ø±Õ»òͨ¹ýij¸öhref³¬¼¶Á´½ÓÀ뿪£®(Ò³Ãæˢк͵ØÖ·À¸¸Ä±äʱ²»Ìáʾ£©
demo.htmlÈçÏ£º
<html>
&n ......

javascript ¶¯Ì¬´´½¨±í¸ñ£ºÐÂÔö¡¢É¾³ýÐк͵¥Ôª¸ñ


ÀûÓÃjsÀ´¶¯Ì¬´´½¨±í¸ñÓÐÁ½ÖÖ¸ñʽ£¬appendChild()ºÍinsertRow¡¢insertCell()¡£Á½ÖÖ·½Ê½Æäʵ²î²»¶à£¬µ«µÚÒ»ÖÖÓпÉÄÜÔÚIEÉÏÓÐÎÊÌ⣬ËùÒÔÍƼö´ó¼ÒʹÓõڶþÖÖÁË£¬Ö±½Ó˵°É¡£
1¡¢inserRow()ºÍinsertCell()º¯Êý
insertRow()º¯Êý¿ÉÒÔ´ø²ÎÊý£¬ÐÎʽÈçÏ£º
insertRow(index)£ºindex´Ó0¿ªÊ¼
Õâ¸öº¯Êý½«ÐÂÐÐÌí¼Óµ½indexµÄÄÇһР......

JavascriptÖÐShowModalDialog¹¦ÄÜ

ShowModalDialogº¯ÊýµÄ¹¦ÄÜ£º
´ò¿ªÒ»¸ö×Ó´°¿Ú£¬²¢ÇÒ¿ÉÓ븸´°¿ÚÏ໥´«µÝÊý¾Ý£¬ËüÓëwindow.openµÄ×î´óÇø±ð¾ÍÔÚÓÚÓÉShowModalDialog´ò¿ª×Ó´°¿Úºó£¬¸¸´°¿Ú½«²»ÄܲÙ×÷¡£
ʹÓ÷½·¨£º
vReturnValue = window.showModalDialog(sURL [, vArguments] [, sFeatures])
²ÎÊý˵Ã÷£º
sURL
±ØÑ¡²ÎÊý£¬ÀàÐÍ£º×Ö·û´®¡£ÓÃÀ´Ö¸¶¨¶Ô»°¿òÒªÏ ......

css,javascriptµÄÔ¤¼ÓÔØ

css,javascriptµÄÔ¤¼ÓÔØ
ΪÁËÌá¸ßÍøÕ¾µÄ¼ÓÔØËٶȣ¬ÓÐÒ»¸öºÜÖØÒªµÄÊֶξÍÊÇÔÚÓû§ä¯ÀÀ¹ý³ÌÖеÄÉÏÓÎÍøÕ¾×öÒ»¸öÎļþµÄÔ¤¼ÓÔØ¡£Ô¤¼ÓÔØÎļþÒ»°ãÓÐÁ½ÖÖ³£Óõķ½Ê½£ºxhrºÍ¶¯Ì¬²åÈë½ÚµãµÄ·½Ê½¡£¶¯Ì¬²åÈë½ÚµãÊÇ×îΪ¼òµ¥Ò²×îΪ¹ã·ºµÄÒ»ÖÖÒì²½¼ÓÔØ·½Ê½(ÀýÈçyuiµÄGetÄ£¿é)£¬È»ºóʹÓö¯Ì¬²åÈë½Úµã·½·¨¼ÓÔصÄÎļþ¶¼»áÔÚ¼ÓÔغóÁ¢¼´Ö´ÐУ¬ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ