JavaScript deleteÔËËã·û
ΪÁËʵÏÖcheckbox¶àÑ¡ÑéÖ¤£¬Ê¹ÓÃjquery.validate £¬ ÎÞ·¨ÊµÏÖ×Ô¶¨Òå´íÎóÐÅÏ¢¡£ÉÏÎçLinchun´ø×ÅÎÒÒ»¿é¶ù¿´jquery.validate.js µÄÔ´´úÂ룬·¢ÏÖÓÅÐãµÄ´úÂëÕæµÄÊǶÔJavaScriptÓõį»ð´¿Çà~ :)
delete ÔËËã·û£º
ÊÇECMAScriptÒ»ÔªÔËËã·û¡£Ò»ÔªÔËËã·ûÖ»ÓÐÒ»¸ö²ÎÊý£¬¼´Òª²Ù×÷µÄ¶ÔÏó»òÖµ¡£ËüÃÇÊÇ ECMAScript ÖÐ×î¼òµ¥µÄÔËËã·û¡£
delete ÔËËã·ûɾ³ý¶ÔÒÔǰ¶¨ÒåµÄ¶ÔÏóÊôÐÔ»ò·½·¨µÄÒýÓá£ÀýÈ磺
var o = new Object;
o.name = "David";
alert(o.name); //Êä³ö "David"
delete o.name;
alert(o.name); //Êä³ö "undefined"
ÔÚÕâ¸öÀý×ÓÖУ¬É¾³ýÁË name ÊôÐÔ£¬Òâζ×ÅÇ¿ÖÆ½â³ý¶ÔËüµÄÒýÓ㬽«ÆäÉèÖÃΪ undefined£¨¼´´´½¨µÄδ³õʼ»¯µÄ±äÁ¿µÄÖµ£©¡£
delete ÔËËã·û²»ÄÜɾ³ý¿ª·¢Õß䶨ÒåµÄÊôÐԺͷ½·¨¡£ÀýÈ磬ÏÂÃæµÄ´úÂ뽫Òý·¢´íÎó£º
delete o.toString;
¼´Ê¹ toString ÊÇÓÐЧµÄ·½·¨Ãû£¬ÕâÐдúÂëÒ²»áÒý·¢´íÎó£¬ÒòΪ toString() ·½·¨ÊÇÔʼµÄ ECMAScript ·½·¨£¬²»ÊÇ¿ª·¢Õß¶¨ÒåµÄ¡£
ÆäËüECMAScriptÒ»ÔªÔËËã·û¿ÉÒԲμû£º
http://www.w3school.com.cn/js/as_js_operators_unary.asp
jQueryÊÇJavaScriptµÄ¿ò¼Ü£¬ÒªÏëÓúÃjQuery£¬»¹ÊÇÒªºÃºÃÉîÈëѧϰJavaScript¡£
Ïà¹ØÎĵµ£º
ÏÖÔÚ¹«Ë¾Óкܶàministe£¬¶¼Óй«²¼»ñ½±Ãûµ¥µÄÒ³Ãæ¡£¶øÇÒÕâÐ©Ò³Ãæ¶¼ÊǾ²Ì¬µÄ¡£µ«ÊÇÓÉÓÚÓÐʱºò»ñ½±µÄÈËÊýÖڶ࣬²»µÃ²»Éè¼Æ³É·ÖÒ³µÄЧ¹û¡£Ä¿Ç°¹«Ë¾µÄcodingÕë¶ÔÕâÖÖÇé¿öûÓкܺõĽâ¾ö·½·¨¡£ÓÚÊǽñÌìÎÒ³é¿ÕдÁËÒ»¸ö¼òµ¥µÄ»ùÓÚjavascriptµÄʵÏÖ·½·¨¡£
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http ......
1. oncontextmenu="window.event.returnValue=false" ½«³¹µ×ÆÁ±ÎÊó±êÓÒ¼ü
<table border oncontextmenu=return(false)> <td>no </table> ¿ÉÓÃÓÚTable
2. <body onselectstart="return false"> È¡Ïûѡȡ¡¢·ÀÖ¹¸´ÖÆ
3. onpaste="return false" ²»×¼Õ³Ìù
4. oncopy="return false;" oncut="re ......
1. oncontextmenu="window.event.returnValue=false" ½«³¹µ×ÆÁ±ÎÊó±êÓÒ¼ü
<table border oncontextmenu=return(false)> <td>no </table> ¿ÉÓÃÓÚTable
2. <body onselectstart="return false"> È¡Ïûѡȡ¡¢·ÀÖ¹¸´ÖÆ
3. onpaste="return false" ²»×¼Õ³Ìù
4. oncopy="return false;" oncut="re ......
Javascript½âÒÉ
1. HTML¿ò¼ÜframesetµÄÓ¦ÓÃ
¿ò¼Ü±à³Ì¸ÅÊöÒ»¸öHTMLÒ³Ãæ¿ÉÒÔÓÐÒ»¸ö»ò¶à¸ö×Ó¿ò¼Ü£¬ÕâЩ×Ó¿ò¼ÜÒÔ<iframe>À´±ê¼Ç£¬ÓÃÀ´ÏÔʾһ¸ö¶ÀÁ¢µÄHTMLÒ³Ãæ¡£ÕâÀïËù½²µÄ¿ò¼Ü±à³Ì°üÀ¨¿ò¼ÜµÄ×ÔÎÒ¿ØÖÆÒÔ¼°¿ò¼ÜÖ®¼äµÄ»¥Ïà·ÃÎÊ£¬ÀýÈç´ÓÒ»¸ö¿ò¼ÜÖÐÒýÓÃÁíÒ»¸ö¿ò¼ÜÖеÄJavaScript± ......
Ö÷Òªº¯Êý CallJScript
BOOL CallJScript(const wchar_t * func, VARIANT * vtParams, int cNumberOfParam, VARIANT * vtResult)
{
if(!func || !func[0])
return FALSE;
CComPtr<IDispatch> spScript;
spScript = GetJScript();
if(!spScript)
return FALSE;
DISPID dispID = NULL;
CC ......