我想在右鍵單擊表格行時顯示上下文菜單,並且想要阻止右鍵單擊除表格行之外的所有頁面。我想通過jQuery加載上下文菜單。當我右鍵單擊表格行時加載div - 上下文菜單
這裏是我的上下文菜單的div:
<div class="xContextMenu">
<ul>
<li><a href="javascript:;" class="next-chat">Accept Next Chat</a></li>
<li><a href="javascript:;" class="next-response">Next Response</a></li>
<li><a href="javascript:;" class="accept-chat">Accept Chat</a></li>
<li><a href="javascript:;" class="refuse-chat">Refuse Chat</a></li>
<li class="xDividerMenu">
<img src="/live-person/web-area/assets/img/xContextDivider.png" alt="" />
</li>
<li><a href="javascript:;" class="invite-chat">Invite Chat</a></li>
<li><a href="javascript:;">Engage</a></li>
<li><a href="javascript:;">Block For Chat</a></li>
<li><a href="javascript:;">Send Private Message</a></li>
<li><a href="javascript:;">Chat Actions</a></li>
<li class="xDividerMenu">
<img src="/live-person/web-area/assets/img/xContextDivider.png" alt="" />
</li>
<li><a href="javascript:;" class="chat-history">Chat History</a></li>
<li><a href="javascript:;">All Sessions history</a></li>
<li><a href="javascript:;">Capture Visitor</a></li>
<li class="xDividerMenu">
<img src="/live-person/web-area/assets/img/xContextDivider.png" alt="" />
</li>
<li><a href="javascript:;">Suggest Content</a></li>
<li class="xDividerMenu">
<img src="/live-person/web-area/assets/img/xContextDivider.png" alt="" />
</li>
<li><a href="javascript:;">Cobrowser</a></li>
</ul>
</div>
你的jQuery代碼呢?你有嘗試過什麼嗎? – Th0rndike
Google「將內容加載到div ajax jquery中。」 – user1477388
我一直嘗試幾個解決方案,但他們加載包含js中的內容。我想加載完整的div。這是我的搜索結果。 https://www.google.com/search?q=show+contextmenustrip+on+right+click&oq=on+right+click+show+&aqs=chrome.1.69i57j0l3j69i62l2.9265j0&sourceid=chrome&ie=UTF-8#sclient= PSY-AB&q =顯示+文本菜單+上+右+單擊+ jQuery和OQ =顯示+文本菜單+上+右+單擊+ jQuery和gs_l = serp.3 ... 5300.5300.1.5504.1.1.0.0.0.0.0.0..0.0 .. ..0.0..1c.1.20.psy-ab.9Gp0RLWsS6M&PBX = 1&BAV = on.2,or.r_cp.r_qf。&BVM = bv.49478099%2Cd.bGE%2Cpv.xjs.s.en_US.MzTIAy2H0K0.O&FP = 47044bcade7a2a4b&BIW = 1280&bih = 923 –