HTMLÖÐʵÏÖÓÒ¼ü²Ëµ¥¹¦ÄÜ
HTMLÖÐʵÏÖÓÒ¼ü²Ëµ¥¹¦ÄÜ
ÎÒÃÇʹÓõÄÓ¦ÓÃϵͳºÜ¶à¶¼ÓÐÓÒ¼ü²Ëµ¥¹¦ÄÜ¡£µ«ÊÇÔÚÍøÒ³ÉÏÃ棬µã»÷ÓÒ¼üÒ»°ãÏÔʾµÄÈ´ÊÇIEĬÈϵÄÓÒ¼ü²Ëµ¥£¬ÄÇôÎÒÃÇÈçºÎʵÏÖ×Ô¼ºµÄÓÒ¼ü²Ëµ¥ÄØ£¿ÏÂÃ潫½²½âÓÒ¼ü²Ëµ¥¹¦ÄܵÄʵÏÖÔÀíºÍʵÏÖ´úÂë¡£
ʵÏÖÔÀí
ÔÚHTMLÓïÑÔÖУ¬»ù±¾ÉÏÿ¸ö¶ÔÏó¶¼ÓÐÒ»¸öoncontextmenuʼþ£¬Õâ¸öʼþ¾ÍÊÇÊó±êµÄÓÒ¼üµ¥»÷ʼþ£¨onclickʼþÊÇÊó±êµÄ×ó¼üµ¥»÷ʼþ£©£¬ÄÇôÎÒÃǾͿÉÒÔÔÚÊó±êÓÒ»÷µÄʱºò£¬ÈÃϵͳµ¯³öÒ»¸ö´°¿Ú£¨Õâ¸öÊÇpopup´°¿Ú£¬ÏÔʾÔÚIEµÄ×îÇ°Ã棬ûÓв˵¥£©£¬ÉÏÃæÏÔʾÎÒÃÇÏëÒªÏÔʾµÄ²Ëµ¥ÐÅÏ¢£¬µ±ÎÒÃǵ¥»÷ÆäÖÐijһÏîµÄʱºò£¬¾ÍÖ´ÐÐÎÒÃÇÉ趨µÄ¶¯×÷£¬È»ºó½«µ¯³ö´°¿Ú¹Ø±Õ¡£
ʵÏÖ´úÂë
ÏÂÃæÎÒдÁËÒ»¸öʾÀý´úÂ룬ģÄâÒ»¸öÊ÷ÐͲ˵¥£¬µ±ÎÒÃÇÓÒ¼üµã»÷Ê÷ÐͲ˵¥Ä³Ò»ÏîµÄʱºò£¬¾Í»áµ¯³öÓÒ¼ü²Ëµ¥£¬ÀïÃæÓГÐÂÔö”¡¢“Ð޸Ĕ¡¢“ɾ³ý”Èý¸ö²Ëµ¥Ïµ¥»÷ijÏî»áÖ´ÐÐÏàÓ¦µÄ²Ù×÷¡£Èç¹ûÊÇÔÚÒ³ÃæµÄÆäËüµØ·½µã»÷ÓÒ¼üµÄ»°£¬¾ÍÖ»ÏÔʾ“ÐÂÔö”Ò»¸ö²Ëµ¥Ïî¡£ÏÂÃæµÄ´úÂëÄÚÈÝ£º
contextmenuDemo.htmlÎļþ
¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D
<%--
/**
*ʵÏÖÓÒ¼ü²Ëµ¥¹¦ÄÜ
*/
<html>
<body oncontextmenu = showMenu('')>
<form name = "menuForm">
<!--Òþ²Ø¿ò£¬ÓÃÀ´±£´æÑ¡ÔñµÄ²Ëµ¥µÄidÖµ-->
<input type = "hidden" name = "id" value = "">
<table>
<tr><td><a href="javascript:clickMenu()" oncontextmenu = showMenu('0')>¸ùĿ¼</a></td></tr>
<tr><td><a href="javascript:clickMenu()" oncontextmenu = showMenu('1')>²Ëµ¥Ò»</a></td></tr>
<tr><td><a href="javascript:clickMenu()" oncontextmenu = showMenu('2')>²Ëµ¥¶þ</a></td></tr>
</table>
</form>
</body>
<!-- ÕâÀïÓÃÀ´¶¨ÒåÐèÒªÏÔʾµÄÓÒ¼ü²Ëµ¥ -->
<div id="itemMenu" style="display:none">
<table border="1" width="100%" height="100%" bgcolor="#cccccc" style="border:thin" cellspacing="0">
<tr>
<td style="cursor:default;border:outset 1;" align="center" onclick="parent.create()">
ÐÂÔö
</td>
</tr&
Ïà¹ØÎĵµ£º
×î½ü±¾À´ÊÇҪȥÄÇǶÈëʽ¿ÎµÄ£¬µ«ÊÇÄǿξ¹È»ËµÈËÊýÌ«ÉÙ£¬¿ª²»ÁË£¬¿¿¡£ËùÒÔÕâÁ½ÌìÖ»ÄÜ×Ô¼ºÑо¿µã¶«Î÷ÁË¡£¼ÇµÃ×Ô¼ºÒÔÇ°¾ÍÏ붯ÊÖдһ¸ö¹ØÓÚdomµÄ½âÎöÒýÇ棬ֻ¹Ö×Ô¼ºÌ«ÀÁ£¬Ò»Ö±Ã»¶¯±Ê¡£×î½üÔÚ¼ÒҲûʲôÊÂ×ö£¬¾Í×Ô¼º¶¯ÊÖдһ¸ö£¬»¨ÁËÒ»Ììʱ¼äдµÄ²î²»¶àÁË£¬ÕýºÃ¶ÍÁ¶×Ô¼ºµÄc++ˮƽ°É¡£
&nb ......
ÔÚWEBÓ¦ÓÃÖÐ,Èç¹ûʹÓÃjsp×÷Ϊview²ãµÄÏÔʾģ°å,¶¼»á±»¿Õ¸ñ/¿Õ»»ÐÐÎÊÌâËùÀ§ÈÅ.
Õâ¸öÎÊÌâµ±ÄêÒ²À§ÈÅÁËÎұȽϳ¤µÄʱ¼ä.ÒòΪÔÚjspÄÚʹÓõÄEL±êÇ©ºÍÆäËû±êǩʱ,»á²úÉú´óÁ¿µÄ¿Õ¸ñºÍ»»Ðзû.ÀýÈç:
------- start ----------
<c:choose>
<c:when test="${fn:length(mainPageList)>1&}&q ......
תÔØ£ºhttp://jiangzhengjun.javaeye.com/blog/480996
ʼþ
DOMͬʱ֧³ÖÁ½ÖÖʼþģʽ£º²¶»ñÐÍʼþºÍðÅÝÐÍʼþ£¬µ«ÊÇ£¬²¶»ñÐÍʼþÏÈ·¢Éú¡£Á½ÖÖʼþÁ÷»á´¥¼°DOMÖеÄËùÓжÔÏ󣬴Ódocument¶ÔÏó¿ª
ʼ£¬Ò²ÔÚdocument¶ÔÏó½áÊø£¨´ó²¿·Ö¼æÈݱê×¼µÄä¯ÀÀ»á¼ÌÐø½«Ê¼þ²¶»ñ/ðÅÝÑÓÐøÖÁwindow¶ÔÏ󣩣¬DOMÖеÄÔªËض¼»áÁ¬ÐøÊÕµ½Á½´ÎÊ ......
˵À´²ÑÀ¢£¬ÎÒ·¢ÏÖ×Ô¼ºÐ´µÄÄǸöhtml parse¹ýÓÚÀíÏ뻯£¬½âÎöxml»¹²î²»¶à£¬Ïë½âÎöÏÖ½ñµÄhtml£¬¹À¼ÆÊDz»´ó¿ÉÄܵģ¬ËùÒÔÎÒ°Ñ´úÂëÖØдÁËÒ»±é£¬Êý¾Ý½á¹¹¸Ä³ÉË«ÏòÁ´±í£¬ÕâÑù½âÎöËٶȸü¿ì£¬×î´ó³Ì¶ÈµØ¶Ôhtml½øÐÐÈÝ´í´¦Àí£¬ÊÔÑéʱ·¢ÏÖµÄÈ·¿ÉÒÔ½âÎöÆÕͨhtml×Ö·û´®£¬²»ÐèÒªÔÙÑϸñ·ûºÏÄǸöxhtml±ê× ......
<script language="javascript">
function newRow()
{
var tbl = document.all("mytbl");
var row = &nb ......