日期:2014-05-16  浏览次数:20477 次

帮忙看下 这个广告页面怎么关闭不了了
<!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 中的系统方法。 冲突了。你换个函数名就行了。