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

javascript checkBoxµÄʹÓÃ

¢Ùfunction doDelete(){
    var deleteArray = new Array();
    var cnt = 0;
    for (i = 0; i < document.forms[0].elements.length; i++ ) {
        // ¥Á¥§¥Ã¥¯¥Ü¥Ã¥¯¥¹¤¬ON¤Î時¤Ï¤½¤Î値¤ò設¶¨¤¹¤ë¡£
        if (document.forms[0].elements[i].type == "checkbox" ) {
            if (document.forms[0].elements[i].checked == true) {
                deleteArray[cnt] = document.forms[0].elements[i].value;
                cnt = cnt + 1;
            }
        }
    }
    if( cnt < 1 ){
        alert('<bean:message key="MM00240E" bundle="momentmsg"/>');
        return;
    }
    if ( confirm('<bean:message key="MM00350I" arg0="測¶¨結¹û" bundle="momentmsg"/>')==true ) {
        document.forms[0].chk.value =deleteArray;
        document.forms[0].action="./MPMG0020DeleteAction.do";
        document.forms[0].submit();
    }
}
¢ÚÔÚhtmlÖÐ×·¼ÓÒ»¸öÒþ²Ø±äÁ¿<html:hidden name="MPMG0020Form" property="chk"/>
¢ÛÔÚMPMG0020DeleteActionÀïʹÓÃÒÔÏ´úÂë¿ÉÒÔ·ÃÎʵ½ÐèҪɾ³ýµÄ¼Í¼:
String[] checkval = null;
//»­Ãæ.Ï÷³ý選択
        String strChecked = (String)MPMG0020Form.get("chk");
        if(strChecked != null && !strChecked.equals("")){
        &


Ïà¹ØÎĵµ£º

ѧϰ¡¶JavaScript¸ß¼¶³ÌÐòÉè¼Æ¡·Ñ§Ï°±Ê¼Ç£¨¶þ£©

Ò»¡¢deleteÔËËã·ûɾ³ý¶ÔÒÔÇ°¶¨ÒåµÄ¶ÔÏóÊôÐÔ»ò·½·¨µÄÒýÓãº
    var o=new Object();
    o.name="hello";
    alert(o.name);    //Êä³ö“hello”
    delete o.name£»
    alert(o.name);   //Êä³ö& ......

JavaScriptÃæÏò¶ÔÏóÏê½â

ÄÚÖÃÀà
JavaScriptÊÇÒ»ÖÖ»ùÓÚ¶ÔÏóµÄ½âÊÍÐÔ±à³ÌÓïÑÔ£¬ËùÓеÄÔªËØ£¬ÎÒÃǶ¼¿ÉÒÔÀí½âΪ¶ÔÏó£¬Ã¿¸ö¶ÔÏóÒ²¿ÉÒÔÀí½âΪN¶àÊôÐԵļ¯ºÏ¡£ÔÚÌÖÂÛ×Ô¶¨ÒåÀà֮ǰ£¬ÎÒÃÇÏÈ¿´Ò»ÏÂÄÚÖõÄÀà¡£×÷Ϊ½âÊÍÐÔÓïÑÔ£¬JavaScriptÔÊÐíÎÒÃÇÔÚÈκÎʱºòΪ¶ÔÏóÌí¼ÓÊôÐÔ¡£ËùÒÔÎÒÃÇ¿ÉÒÔÏÈ¿´Ò»¶Î¼òµ¥µÄ´´½¨¶ÔÏóµÄ´úÂëƬ¶Î¡£ÕâÀïµÄ“new Object”Ò²¿ ......

jsÈçºÎʵÏÖÔÚÒ³ÃæÍêÈ«¼ÓÔغóÖ´ÐÐjavascriptº¯Êý

jsÈçºÎʵÏÖÔÚÒ³ÃæÍêÈ«¼ÓÔغóÖ´ÐÐjavascriptº¯Êý»ò/´úÂëÄØ?
¿ÉÒÔÊÇÒÔϼ¸ÖÖ
<body onload="function name()" > </body  >
<script >window.onload=function name </script >
<script language="javascript" for="window" event="onload" >function name(); </script >
µ ......

Javascript DOMѧϰ±Ê¼Ç2


´´½¨ÎĵµÔªËØ
document.createElement(nodename)
²åÈëÔªËص½Îĵµ½ÚµãÊ÷
parent.appendChild(child)
´´½¨Îı¾½Úµã
document.createTextNode(text)
ÔÚÏÖÓÐÔªËØÇ°²åÈëÐÂÔªËØ
parentElement.insertBefore(newElement,targetElement)
ÔÚÏÖÓÐÔªËغó²åÈëÐÂÔªËØ£¨×ԱຯÊý£©
parentElement.insertAfter(newElement,targe ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ