javascript ¿ØÖÆ htmlÔªËØ ÏÔʾ/Òþ²Ø
javascript ¿ØÖÆ htmlÔªËØ ÏÔʾ/Òþ²Ø
1¡£±àдjsº¯Êý
<script type="text/javascript">
function display(y){$(y).style.display=($(y).style.display=="none")?"":"none";}
function $(s){return document.getElementById(s);}
</script>
2. ÒªÏÔʾ/Òþ²ØµÄhtmlÔªËØ¼ÓÉÏ id ÊôÐÔ
<table>
<tr id="menu" >
<td>¿ØÖÆÕâ¸ötrµÄÏÔʾ/Òþ²Ø</td>
</tr>
</table>
3£¬Ìí¼Ó°´Å¥£¬Á´½ÓµÈ´¥·¢ js º¯Êý
<input type="button" onclick="display('menu')" value="ÏÔʾ/Òþ²Ø"/>
<a href="#" onclick="display('menu')" >ÏÔʾ/Òþ²Ø</a>
javascriptÏÔʾÒþ²Ø²ã<div id="layer" style="display:none;">¹ã¸æ</div>
<input type="botton" onclick="display(layer)">
¶þ:javascript¿ØÖÆÒ³Ãæ¿Ø¼þÒþ²ØÏÔʾµÄÁ½ÖÖ·½·¨
javascript¿ØÖÆÒ³Ãæ¿Ø¼þÒþ²ØÏÔʾµÄÁ½ÖÖ·½·¨£¬·½·¨µÄ²»Í¬Ö®´¦ÔÚÓڿؼþÒþ²ØºóÊÇ·ñ»¹ÔÚÒ³ÃæÉÏռλ
·½·¨Ò»£º
document.all["PanelSMS"].style.visibility="hidden";
document.all["PanelSMS"].style.visibility="visible";
·½·¨¶þ£º
document.all["PanelSMS"].style.display="none";
document.all["PanelSMS"].style.display="inline";
·½·¨Ò»Òþ²Øºó Ò³ÃæµÄλÖû¹±»¿Ø¼þÕ¼Óà ֻÊDz»ÏÔʾ
·½·¨¶þÒþ²Øºó Ò³ÃæµÄλÖò»±»Õ¼ÓÃ
Example:
(1)
<script type="text/javascript">
function display(y){$(y).style.display=($(y).style.display=="none")?"":"none";}
function $(s){return document.getElementById(s);}
</script>
<div>
<table>
<tr id="menu" >
<td>XXXX</td>
</tr>
</table>
<input type="button" onclick="display('menu')" value="show/hide"/>
<div i
Ïà¹ØÎĵµ£º
±ê׼ʼþÊôÐÔ
HTML 4 Ôö¼ÓÁËͨ¹ýʼþ´¥·¢ä¯ÀÀÆ÷ÖÐÐÐΪµÄÄÜÁ¦£¬±ÈÈçµ±Óû§µã»÷ij¸öÔªËØÊ±Æô¶¯Ò»¶Î JavaScript¡£
Èç¹ûÐèҪѧϰ¸ü¶àÓйØÊ¹ÓÃÕâЩʼþ½øÐбà³ÌµÄÄÚÈÝ£¬ÇëѧϰÎÒÃÇµÄ JavaScript ½Ì³Ì ºÍ DHTML ½Ì³Ì¡£
ÏÂÃæµÄ±í¸ñÁгöÁ˿ɲåÈë HTML 5 ÔªËØÖÐÒÔ¶¨ÒåʼþÐÐΪµÄ±ê׼ʼþÊôÐÔ¡£
HTML 4.01 Óë HTML 5 Ö®¼äµÄ²îÒì ......
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>ʹÓÃJavaScriptÑéÖ¤ÊäÈë±íµ¥µÄÕýÈ·ÐÔ </title>   ......
±¾ÎÄÖ÷ÒªÊdzöÓÚÓÐÅóÓÑʹÓÃÎÒÔÀ´Ð´µÄautocompleteµÄJS¿Ø¼þ¡£µ±Êý¾ÝÁ¿´óµÄʱºò£¬»á³öÏÖЧÂʼ«ÆäÂýµÄÇé¿ö£¬ÎÒÔÚÕâ¶Îʱ¼ä×ö³öµÄһЩ²âÊÔÒ²¼°Ò»Ð©¾Ñ飬Óë´ó¼Ò·ÖÏí£¬Èç¹ûÓдíµÄµØ·½£¬»¹ÇëÖ¸³ö¡£
¾¹ý²âÊÔ£¬ÎÒÃǻᷢÏÖÈçϵÄÇé¿ö»òÕß˵µÄ½áÂÛ£¬Èç¹ûÄúµÄ²âÊÔ½á¹ûÓëÎҵIJ»·û£¬Çë˵Ã÷ÔÒò£¬ÒÔ±ãÏ໥ѧϰ¡£
1£©µ±Ò»¸ö½Ï´óµÄHTML×Ö· ......
/**
* ±í¸ñÅÅÐò(µ¥¸ö±í¸ñ£¬½µÐò)
* @example
* <code>
* <table is_sort="1">
* <tr>
* <th><a href="javascript:void(0)" mce_href="javascript:void(0)" onclick="table_sort(0, 0)">field1</a></th>
* <th><a href="javascript:void(0)" mce_href ......
·½°¸Ò»£º
// html & JavaScript
...
<button value="Click me"
onclick="window.navigate('app:command&arg1=1&arg2=2')" />
...
// C++: ÏìÓ¦ µÄÏûÏ¢º¯ÊýOnBeforeNavigat2
virtual void OnBeforeNavigate2( LPCTSTR lpszURL, DWORD nFlags, LPCTSTR lpszTar ......