请问我要点右键的时候弹出菜单,为什么不正确,谢谢,在线等候
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>
<script language="JavaScript">
var x,y,strHtml;
function mouseEvent(){
x = event.clientX;
y = event.clientY;
}
function isIE(){
if(document.all){
return true;
}else{
return false;
}
}
function showButton()[
var isButton;
if(isIE){
if(event.button == 2 || event.button == 3){
isButton = true;
}else{
isButton = false;
}
}
return isButton;
}
function drawHtml(){
strHtml = "<table width=\"13%\" border=\"0\" style=\"background-color:red\"><tr> <td width=\"18%\"> </td><td width=\"82%\">ba</td></tr></table>" ;
}
function innt()[
mouseEvent();
if(showButton()){
drawHtml();
document.all[pop].innerText = strHtml;
document.all[pop].style.display = "block";
document.all[pop].style.left = x ;
document.all[pop].style.top = y;
}
}
document.onClick = innt();
</script>
<body>
<div id="pop" style="display:none"></div>
</body>
</html>