首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > JavaScript >

帮忙看下 这个广告页面如何关闭不了了

2012-04-17 
帮忙看下 这个广告页面怎么关闭不了了!DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//ENh

帮忙看下 这个广告页面怎么关闭不了了
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
  <meta http-equiv="Content-Type" content="text/html; charset=GBK" />
  <title>制作网页右下角广告窗口效果</title>
<script language="JavaScript" type="text/javascript">
function close(){
document.getElementById("main").style.display="none";
}
</script>
<style type="text/css">
#main{
background:url(images/pop_bg.gif) no-repeat;
width:350px;
height:235px;
position:fixed;
right:0px;
bottom:0px;
}
.title{
margin-left:10px;
margin-top:10px;
width:255px;
float:left;
}
.close{

height:20px;
margin-top:5px;
margin-right:5px;
float:right;
}
</style>
  </head>
  <body>
 <div id="main">
 <div class="title">广告</div>
<div class="close"></div>
 </div>
<div style="clear:both;"></div>
<input value="sas" type="button" onclick="close()"/>
  </body>
</html>


[解决办法]
close()是js 中的系统方法。 冲突了。你换个函数名就行了。

热点排行