本文实例讲述了javascript自定义右键弹出菜单实现方法。分享给大家供大家参考。具体实现方法如下:
无标题页var oPopup = window.createPopup();
function PopMenu(id)
{
var oPopBody = oPopup.document.body;
oPopBody.style.backgroundColor = "buttonface";
oPopBody.style.border = "solid black 1px";
var TableBegin="
var Tr1="
查看新闻";var TrBr1="
";var Tr2="
查看新闻";var TableEnd="
";oPopBody.innerHTML =TableBegin+Tr1+TrBr1+Tr2+TableEnd;
oPopup.show(event.x, event.y, 90, 41, document.body);
return false;
}