纠结

2013-07-13 20:28:02 -0400
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "www.w3. org/...al.dtd"> <html xmlns="www.w3.org/1999/xhtml "> <head> <meta http-equiv="Content-Type" cont ent="text/html; charset=utf-8" /> <title>无标题文档</title> <style> .holder{ position:absolute; border:solid #FF0000 1px; height:20px; } div .bar { background-color:#003300; height:20p x; } </style> <script>

function confirmDialog(){ if(window.confirm("请评良心选择,是请 选择'确定',不是'取消'"))

alert("果然群众眼睛是雪亮的!"); else new ProgressBar(); } function ProgressBar () { this.holder = document.createElement(' div'); this.bar = document.createElement('div' );

this.holder.appendChild(this.bar);

this.holder.className = 'holder'; this.bar.className = 'bar';

this.bar.style.width = '0px'; this.holder.style.width = '100px';

var that = this;

this.show = function () { var w = (window.innerWidth) ? window.i nnerWidth : (document.documentElem ent && document.documentElement.cli entWidth) ? document.documentEleme nt.clientWidth : document.body.offsetW idth; var h = (window.innerHeight) ? win dow.innerHeight : (document.documen tElement && document.documentElem ent.clientHeight) ? document.document Element.clientHeight : document.body. offsetHeight; this.holder.style.top = h/2 + 'px'; this.holder.style.left = w/2 + 'px'; document.body.appendChild(this.holde r); this.timer = setInterval(this.grow, 100); }; this.grow = function () {

var barWidth = parseInt(that.bar.style.w idth); var holderWidth = parseInt(that.holder. style.width);

barWidth += 10; barWidth = Math.min(barWidth, holder Width);

that.bar.style.width = barWidth + 'px'; if (barWidth === holderWidth) { clearInterval(that.timer); document.body.removeChild(that.holde r); that.onEnd(); } }; this.onEnd = function () { alert("木马释放注入成功!!"); } this.show(); }

</script> </head>

<body> <form> <input type="button" value="小楠是宇 宙第一帅哥么?" onclick="confirmDialo g()"> </form>

</body> </html>
«Newer      Older»
Comment:
Name:

Back to home

Subscribe | Register | Login | N