在<body>中任意处添加DIV,例如:
<div id="tip" style="position: absolute; display: none; border: 1px; border-style: solid;">
<TABLE id="tipTable" border="0" bgcolor="#EEE9DF">
<tr>
<th></th>
</tr>
<TR>
<TD></TD>
</TR>
<TR>
<TD></TD>
</TR>
</TABLE>
</div>
function showDialog(url) {
var e=window.event;
var posx=0,posy=0;
if(e.pageX || e.pageY){
posx=e.pageX;
posy=e.pageY;
}
else if(e.clientX || e.clientY){
if(document.documentElement.scrollTop){
posx=e.clientX+document.documentElement.scrollLeft;
posy=e.clientY+document.documentElement.scrollTop;
} else{
posx=e.clientX+document.body.scrollLeft;
posy=e.clientY+document.body.scrollTop;
}
}
document.all.tip.style.top=(posy+10)+"px";
document.all.tip.style.left=(posx-20)+"px";
document.all.tip.style.display="block";
document.all.tipTable.rows[0].cells[0].innerHTML="请选择"; document.all.tipTable.rows[1].cells[0].innerHTML="<input type='radio' name='type' value='新项目' onclick='relocation(this)'>新项目</input>"; document.all.tipTable.rows[2].cells[0].innerHTML="<input type='radio' name='type' value='变更' onclick='relocation(this)'>变更</input>";
}
posted on 2009-09-26 14:59
Worker 阅读(122)
评论(0) 编辑 收藏 所属分类:
脚本