请问怎样修改以下的javascript?

icanseeyou 2003-03-15 12:32:42
下面的是一打开ie就弹出一个框的,但我不想一开ie就弹出框,而是鼠标经过按钮popout才弹出框,是经过,不是按下,请问怎样修改?

<html>

<head>
<script language="JavaScript1.2">

function initializedrag(e){
crossobj=document.all? document.getElementById("showimage") : document.all
}

document.onmousedown=initializedrag

function hidebox(){

crossobj.style.visibility="hidden"

}

</script>

<div id="showimage" style="position:absolute;width:250px;left:500;top:250">

<table border="0" width="250" bgcolor="#000080" cellspacing="0" cellpadding="2">
<tr>
<td width="100%"><table border="0" width="100%" cellspacing="0" cellpadding="0"
height="36">
<tr>
<td width="100%"></td>
<td style="cursor:hand"><a href="#" onClick="hidebox();return false"><img src="close.gif"

width="16" height="14" border=0></a></td>
</tr>
<tr>
<td width="100%" bgcolor="#FFFFFF" style="padding:4px" colspan="2">

Testing 1 2 3

</td>
</tr>
</table>
</td>
</tr>
</table>
</div>

<a href="#" onmouseover="popout()">popout</a>

</body>
</html>
...全文
65 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
icanseeyou 2003-03-15
  • 打赏
  • 举报
回复
thank again!
saucer 2003-03-15
  • 打赏
  • 举报
回复
<html><head>
<script language="JavaScript1.2">
var crossobj;
function initializedrag(e)
{
crossobj=document.all? document.getElementById("showimage") : document.all;
}

document.onmousedown=initializedrag;

function showbox(bShow)
{
crossobj.style.visibility= bShow? "visible" : "hidden";
}
</script>
<div id="showimage" style="position:absolute;width:250px;left:500;top:250;visibility:hidden">
<table border="0" width="250" bgcolor="#000080" cellspacing="0" cellpadding="2">
<tr>
<td width="100%"><table border="0" width="100%" cellspacing="0" cellpadding="0"
height="36">
<tr>
<td width="100%"></td>
<td style="cursor:hand"><a href="#" onClick="showbox(false);return false"><img src="close.gif"
width="16" height="14" border=0></a></td>
</tr>
<tr>
<td width="100%" bgcolor="#FFFFFF" style="padding:4px" colspan="2">
Testing 1 2 3
</td>
</tr>
</table>
</td>
</tr>
</table>
</div>
<a href="#" onclick="showbox(true);return false">popout</a>
</body></html>
howtofind 2003-03-15
  • 打赏
  • 举报
回复
saucer(思归, MS .NET MVP) :
万分感谢!
saucer 2003-03-15
  • 打赏
  • 举报
回复
document.onmousedown=initializedrag;
===>
window.onload=initializedrag;

<a href="#" onclick="showbox(true);return false">popout</a>
===>
<a href="#" onmouseover="showbox(true);return false;">popout</a>
icanseeyou 2003-03-15
  • 打赏
  • 举报
回复
saucer(思归, MS .NET MVP):
谢谢你,但怎样让鼠标经过(不是按下)按扭popout就弹出框?

62,047

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术交流专区
javascript云原生 企业社区
社区管理员
  • ASP.NET
  • .Net开发者社区
  • R小R
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

.NET 社区是一个围绕开源 .NET 的开放、热情、创新、包容的技术社区。社区致力于为广大 .NET 爱好者提供一个良好的知识共享、协同互助的 .NET 技术交流环境。我们尊重不同意见,支持健康理性的辩论和互动,反对歧视和攻击。

希望和大家一起共同营造一个活跃、友好的社区氛围。

试试用AI创作助手写篇文章吧