JavaScriptʼþ°ó¶¨µÄ·½·¨ËµÃ÷ ÊÕ²Ø
JavaScriptʼþ°ó¶¨µÄ·½·¨ËµÃ÷ ÊÕ²Ø
ʼþʹµÃ¿Í»§¶ËµÄ JavaScript Óлú»á±»¼¤»î£¬²¢µÃÒÔÔËÐС£ÔÚÒ»¸ö Web Ò³Ãæ×°ÔØÖ®ºó£¬ÔËÐнű¾µÄΨһ·½Ê½£¬¾ÍÊÇÏìӦϵͳ»òÕßÓû§µÄ¶¯×÷¡£ËäÈ»´ÓµÚÒ»¸öÖ§³Ö½Å±¾±à³ÌµÄä¯ÀÀÆ÷ÃæÊÀÒÔÀ´£¬¼òµ¥µÄʼþ±»ÊµÏÖΪ JavaScript µÄÒ»²¿·Ö£»µ«ÊÇ´ó¶àÊý×î½ü³öÏÖµÄä¯ÀÀÆ÷¶¼ÊµÏÖÁËǿ׳µÄʼþÄ£ÐÍ£¬Ê¹½Å±¾¿ÉÒÔ¸ü¼ÓÖÇÄܵش¦Àíʼþ¡£ÏÖÔÚµÄÎÊÌâÔÚÓÚ£ºÎªÁËÖ§³Ö¸÷ÖÖä¯ÀÀÆ÷£¬Äú±ØÐëºÍ¶à¸öÏȽøµÄ ʼþÄ£ÐÍ×ö¶·Õù£¬×¼È·µØ˵£¬ÊÇÈý¸ö¡£
ÕâÈý¸öʼþÄ£ÐÍ·Ö±ðºÍÏÂÃæµÄÎĵµ¶ÔÏóÄ£ÐÍ£¨Document Object Model£¬¼´ DOM£©Èý¾ÞÍ·½áÃË£ºNetscape Navigator 4 (NN4)£¬Macintosh ºÍ Windows ϵͳµÄ Internet Explorer 4 ¼°Æä¸üа汾(IE4+)£¬ÒÔ¼°ÔÚ Safari Öеõ½ÊµÏÖµÄ W3C DOM¡£¾¡¹ÜÕâЩģÐÍÖ®¼äÓÐЩµØ·½´æÔÚһЩ±¾ÖʵIJî±ð£¬µ«ÊÇÔÚһЩ¼òÒ×µÄ JavaScript µÄ°ïÖúÏ£¬ËüÃǶ¼¿ÉÒÔͬʱÊÊÓÃÓÚͬһ¸öÎĵµ¡£±¾ÎÄÖ÷Òª×ÅÑÛÓÚÏ໥³åÍ»µÄʼþÄ£ÐÍÖеÄÁ½¸ö¹Ø¼ü·½Ã棺
·°ÑÒ»¸öʼþºÍ HTML ÔªËØ°ó¶¨ÆðÀ´µÄ·½·¨¡£
·ÔÚʼþ±»´¥·¢ºóÈçºÎ¶ÔÖ®½øÐд¦Àí¡£
ʼþ°ó¶¨µÄ·½·¨
ʼþ°ó¶¨ÊÇÖ¸¹¹ÔìÒ»¸öÏìӦϵͳ»òÕßÓû§¶¯×÷µÄ HTML ÔªËصĹý³Ì¡£ÔÚ²»Í¬µÄä¯ÀÀÆ÷°æ±¾ÖУ¬Óв»ÉÙÓÚÎåÖÖʼþ°ó¶¨¼¼Êõ¡£ÏÂÃæÎÒÃÇ¿ìËٵؽéÉÜÒ»ÏÂÕâЩ¼¼Êõ¡£
ʼþ°ó¶¨·½·¨I£º°ó¶¨ÔªËØÊôÐÔ
×î¼òµ¥ºÍÏòºó¼æÈÝÐÔ×îºÃµÄʼþ°ó¶¨·½·¨ÊÇ°Ñʼþ°ó¶¨µ½ÔªËرêʶµÄÊôÐÔ¡£Ê¼þÊôÐÔÃû³ÆÓÉʼþÀàÐÍÍâ¼ÓÒ»¸ö“on”ǰ׺¹¹³É¡£¾¡¹ÜHTMLÊôÐÔ²¢²»ÊÇ´óСдÃô ¸ÐµÄ£¬ÈËÃÇ»¹ÊǶ¨ÒåÁËÒ»¸ö¹æÔò£¬¹æ¶¨Ê¼þÀàÐ͵Äÿһ¸ö“´Ê”µÄÊ××Öĸ´óд£¬±ÈÈç onClick ºÍ onMouseOver¡£ÕâЩÊôÐÔÒ²±»³ÆΪʼþ´¦ÀíÆ÷£¬ÒòΪËüÃÇָʾÁËÔªËØÈçºÎ“´¦Àí”Ìض¨µÄʼþÀàÐÍ¡£
ÕýÈ·µÄʼþ´¦ÀíÆ÷ÊôÐÔµÄÖµÔÚÐÎʽÉÏÊDZ»ÒýºÅ°üº¬µÄ JavaScript Óï¾ä¡£×î³£¼ûµÄÖµÊÇÒ»Ìõµ÷ÓÃij¸ö½Å±¾º¯ÊýµÄÓï¾ä£¬¶ø±»µ÷Óõĺ¯ÊýÔÚλÓÚ
ÎĵµÇ°²¿µÄ <SCRIPT> ±êʶÖж¨Òå--¸Ã±êʶͨ³£Î»ÓÚ <HEAD> ²¿·Ö¡£¾ÙÀýÀ´Ëµ£¬ÏÂÃæµÄº¯Êý£º
function myFunc() {
// script statements here
}
¿ÉÒÔ±»¶¨ÒåΪһ¸ö°´¼ü¿Ø¼þµÄʼþ´¦ÀíÆ÷£¬°´¼üµÄ¶¨ÒåÈçÏ£º
<INPUT TYPE="button" NAME="myButton" VALUE="Click Here"
onClick="myFunc()">
°Ñʼþ°ó¶¨µ½ÔªËØÊôÐÔÉÏÓÐÒ»¸öÓŵ㣬¼´¿ÉÒÔÖ§³Ö¿ª·¢Õ߰ѲÎÊý´«µÝ¸øʼþ´¦ÀíÆ
Ïà¹ØÎĵµ£º
ShowModalDialogº¯ÊýµÄ¹¦ÄÜ£º
´ò¿ªÒ»¸ö×Ó´°¿Ú£¬²¢ÇÒ¿ÉÓ븸´°¿ÚÏ໥´«µÝÊý¾Ý£¬ËüÓëwindow.openµÄ×î´óÇø±ð¾ÍÔÚÓÚÓÉShowModalDialog´ò¿ª×Ó´°¿Úºó£¬¸¸´°¿Ú½«²»ÄܲÙ×÷¡£
ʹÓ÷½·¨£º
vReturnValue = window.showModalDialog(sURL [, vArguments] [, sFeatures])
²ÎÊý˵Ã÷£º
sURL
±ØÑ¡²ÎÊý£¬ÀàÐÍ£º×Ö·û´®¡£ÓÃÀ´Ö¸¶¨¶Ô»°¿òÒªÏ ......
jQuery, MooTools, Prototype µÈÓÅÐãµÄ
JavaScript ¿ò¼ÜÓµÓи÷ÖÖÇ¿´óµÄ¹¦ÄÜ£¬°üÀ¨»æÖÆ Web ͼ±í£¬Ê¹ÓÃÕâЩ¿ò¼ÜÒÔ¼°ÏàÓ¦²å¼þ£¬ÎÒÃÇ¿ÉÒԷdz£ÇáËɵØʵÏÖÇúÏßͼ£¬Ô²±ýͼ£¬Öù״ͼµÈ
Web ͼ±íµÄ»æÖÆ£¬¶ø²»±ØÏóÒÔÍùÄÇÑùͨ¹ý¸´Ô Flash ¼¼ÊõʵÏÖ¡£±¾ÎĽéÉÜÁË9¸öÓÅÐãµÄ»ùÓÚ JavaScript Óë CSS& ......
css,javascriptµÄÔ¤¼ÓÔØ
ΪÁËÌá¸ßÍøÕ¾µÄ¼ÓÔØËٶȣ¬ÓÐÒ»¸öºÜÖØÒªµÄÊֶξÍÊÇÔÚÓû§ä¯ÀÀ¹ý³ÌÖеÄÉÏÓÎÍøÕ¾×öÒ»¸öÎļþµÄÔ¤¼ÓÔØ¡£Ô¤¼ÓÔØÎļþÒ»°ãÓÐÁ½ÖÖ³£Óõķ½Ê½£ºxhrºÍ¶¯Ì¬²åÈë½ÚµãµÄ·½Ê½¡£¶¯Ì¬²åÈë½ÚµãÊÇ×îΪ¼òµ¥Ò²×îΪ¹ã·ºµÄÒ»ÖÖÒì²½¼ÓÔØ·½Ê½(ÀýÈçyuiµÄGetÄ£¿é)£¬È»ºóʹÓö¯Ì¬²åÈë½Úµã·½·¨¼ÓÔصÄÎļþ¶¼»áÔÚ¼ÓÔغóÁ¢¼´Ö´ÐУ¬ ......
ǰ̨£º
<%@ Page AutoEventWireup="true" CodeBehind="CustomerBizList.aspx.cs" Inherits="SSMIS.UI.MISUI.CustomerBizList"
Language="C#" MasterPageFile="/Master/WebAdmin.master" %>
<asp:Content ID="Content1" runat="Server" ContentPlaceHolderID="bcr">
......
<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"&g ......