
新建网页写入代码即可
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>网页d出广告窗口 boaer.com</title>
<meta http-equiv="Content-Type" content="text/htmlcharset=utf-8" />
<style type="text/css">
body,html{margin:0padding:0font-size:12pxfont-family:Arialfont:12px/1 Helvetica, Tahoma, Arial, \5b8b\4f53, sans-serif}
.fixedMask{position:fixeddisplay:nonetop:0left:0z-index:999width:100%height:100%background:#000filter:alpha(opacity=30)opacity:0.3}
* html { background:url(*) fixed}
* html body { margin:0height:100%}
* html .fixedMask{ position: absoluteleft: expression(documentElement.scrollLeft + documentElement.clientWidth - this.offsetWidth)top: expression(documentElement.scrollTop + documentElement.clientHeight - this.offsetHeight)}
#ad{width:570pxheight:345pxborder:1px solid #333border-top-width:5pxposition:absolutez-index:9999left:50%margin-left:-290pxtop:50%margin-top:-175pxdisplay:none}
#ad a{display:blockposition:absolutetext-decoration:noneright:0top:0pxfont: 12px/1.5 arialbackground:#B50000padding:2px 5pxcolor:#fff}
#ad a:hover{background:red}
</style>
</head>
<body>
<iframe scrolling="no" src="http://boaer.com" style="width:100%height:1000px"></iframe>
<div id="ad">
<a href="#1" >关闭</a>
<img src="http://home.blueidea.com/attachment/201006/4/194782_1275642410qVBm_m.jpg" alt="" />
</div>
</body>
<script type="text/javascript">
//<![CDATA[
alert('5秒后自动关掉!')
function Mask() {
if (Mask.instance) return Mask.instance
this.el = document.body.appendChild(document.createElement('DIV'))
this.el.className = 'fixedMask'
Mask.instance = this
}
Mask.prototype = {
show: function(fn) {
this.el.style.display = 'block'
fn&&fn()
},
hide: function(fn) {
this.el.style.display = 'none'
fn&&fn()
}
}
var x=new Mask()
var AD=document.getElementById('ad')
AD.getElementsByTagName('A')[0].onclick=hide
x.show(function (){
AD.style.display='block'
})
setTimeout(hide,5000)
function hide(){
x.hide(function (){
AD.style.display='none'
})
}
//]]>
</script>
</html>
首先要弄明白:PHP 是一种解释型的脚步语言,他需要一个解释器去解析PHP,那么你在本地或者远端服务器都需要搭建一个PHP的运行环境(PHP+Mysql+Nginx/Apache+Linux/windows),然后需要具备前端相关知识:Html+CSS。<form action="" method="post" name="myform" onsubmit="return test()"><input type="text" id="myinput"/><input type="submit" value="test"/></form><script language="javascript">function test(){var myinput=document.getElementById("myinput")if(myinput.value==null){alert("please input a value")return false}else{return true}}</script>欢迎分享,转载请注明来源:内存溢出
微信扫一扫
支付宝扫一扫
评论列表(0条)