<div class="codetitle"> <span><a style="CURSOR: pointer" data="46047" class="copybut" id="copybut46047" onclick="doCopy('code46047')"><u>複製程式碼</u></a></span> 程式碼如下:</div> <div class="codebody" id="code46047"> <br>function $(id) { <br>return document. ); <br>} <br>$('test').oncontextmenu=function() { return false; }; <br> </div> <br>這樣就可以給指定的元素自訂右鍵選單