资料
表格
制度
合同
管理
职场
经营
创业
范文
总结
计划
作文
文章
美文
词句
教程
模板
图片
字体
图标
办公
人事
财务
生产
管理资源吧首页
>>>
教程
>>>
编程
>>>
JavaScript教程
>>>
渐变的Alert
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="gb2312" > <head> <meta http-equiv="content-type" content="text/html; charset=gb2312" /> <meta name="author" content="Smiling Dolphin" /> <meta name="keywords" content="design, css, cascading, style, sheets, xhtml, graphic design, w3c, web standards, visual, display, java, javascript, c++, php, jsp, asp, py, pl" /> <meta name="description" content="my favorites language." /> <meta name="robots" content="all" /> <title>Dolphin Document</title> </head> <body> <input type="button" value="显示Alert" onclick="alert('我改写了Alert显示的样式')" /> <p>abc</p> <p>abc</p> <p>abc</p> <p>abc</p> <p>abc</p> <p>abc</p> <p>abc</p> <p>abc</p> <p>abc</p> <p>abc</p> <p>abc</p> <p>abc</p> <p>abc</p> <p>abc</p> <p>abc</p> <p>abc</p> <p>abc</p> <p>abc</p> <p>abc</p> <p>abc</p> <p>abc</p> <p>abc</p> <p>abc</p> <p>abc</p> <img src="/_New/_cj/myeditor/sysimage/space.gif" class="ewebeditor__script" _ewebeditor_fake_tag="script" _ewebeditor_fake_value="%3Cscript%20language%3D%22javascript%22%20type%3D%22text%2Fjavascript%22%3E%20%0D%0Awindow.alert%20%3D%20function(txt)%20%0D%0A%7B%20%0D%0A%20%20%20%20%2F%2Fdocument.write(txt)%3B%20%0D%0A%20%20%20%20var%20shield%20%3D%20document.createElement(%22DIV%22)%3B%20%0D%0A%20%20%20%20shield.style.position%20%3D%20%22absolute%22%3B%20%0D%0A%20%20%20%20shield.style.left%20%3D%20%220px%22%3B%20%0D%0A%2F%2F%20%20%20%20shield.id%20%3D%20%22shield%22%3B%20%0D%0A%20%20%20%20shield.style.top%20%3D%20%220px%22%3B%20%0D%0A%20%20%20%20shield.style.width%20%3D%20%22100%25%22%3B%20%0D%0A%20%20%20%20shield.style.height%20%3D%20document.body.clientHeight%2B%22px%22%3B%20%0D%0A%20%20%20%20shield.style.background%20%3D%20%22%23333%22%3B%20%0D%0A%20%20%20%20shield.style.textAlign%20%3D%20%22center%22%3B%20%0D%0A%2F%2F%20%20%20%20shield.style.lineHeight%20%3D%20document.body.clientHeight%2B%22px%22%3B%20%0D%0A%20%20%20%20shield.style.zIndex%20%3D%20%221%22%3B%20%0D%0A%20%20%20%20shield.style.filter%20%3D%20%22alpha(opacity%3D0)%22%3B%20%0D%0A%20%20%20%20var%20alertFram%20%3D%20document.createElement(%22DIV%22)%3B%20%0D%0A%20%20%20%20alertFram.style.position%20%3D%20%22absolute%22%3B%20%0D%0A%20%20%20%20alertFram.style.left%20%3D%20%2250%25%22%3B%20%0D%0A%20%20%20%20alertFram.style.top%20%3D%20%2250%25%22%3B%20%0D%0A%20%20%20%20alertFram.style.marginLeft%20%3D%20%22-225px%22%3B%20%0D%0A%20%20%20%20alertFram.style.marginTop%20%3D%20%22-75px%22%3B%20%0D%0A%20%20%20%20alertFram.style.width%20%3D%20%22450px%22%3B%20%0D%0A%20%20%20%20alertFram.style.height%20%3D%20%22150px%22%3B%20%0D%0A%20%20%20%20alertFram.style.background%20%3D%20%22%23ccc%22%3B%20%0D%0A%20%20%20%20alertFram.style.textAlign%20%3D%20%22center%22%3B%20%0D%0A%20%20%20%20alertFram.style.lineHeight%20%3D%20%22150px%22%3B%20%0D%0A%20%20%20%20alertFram.style.zIndex%20%3D%20%222%22%3B%20%0D%0A%20%20%20%20strHtml%20%20%3D%20%22%3Cul%20style%3D%5C%22list-style%3Anone%3Bmargin%3A0px%3Bpadding%3A0px%3Bwidth%3A100%25%5C%22%3E%5Cn%22%3B%20%0D%0A%20%20%20%20strHtml%20%2B%3D%20%22%20%20%20%20%3Cli%20style%3D%5C%22background%3A%23DD828D%3Btext-align%3Aleft%3Bpadding-left%3A20px%3Bfont-weight%3Abold%3Bheight%3A25px%3Bline-height%3A25px%3Bborder%3A1px%20solid%20%23F9CADE%3B%5C%22%3E%5B%E7%B3%BB%E7%BB%9F%E6%8F%90%E7%A4%BA%5D%3C%2Fli%3E%5Cn%22%3B%20%0D%0A%20%20%20%20strHtml%20%2B%3D%20%22%20%20%20%20%3Cli%20style%3D%5C%22background%3A%23fff%3Btext-align%3Acenter%3Bfont-weight%3Abold%3Bheight%3A120px%3Bline-height%3A120px%3Bborder-left%3A1px%20solid%20%23F9CADE%3Bborder-right%3A1px%20solid%20%23F9CADE%3B%5C%22%3E%22%2Btxt%2B%22%3C%2Fli%3E%5Cn%22%3B%20%0D%0A%20%20%20%20strHtml%20%2B%3D%20%22%20%20%20%20%3Cli%20style%3D%5C%22background%3A%23FDEEF4%3Btext-align%3Acenter%3Bfont-weight%3Abold%3Bheight%3A25px%3Bline-height%3A25px%3B%20border%3A1px%20solid%20%23F9CADE%3B%5C%22%3E%3Cinput%20type%3D%5C%22button%5C%22%20value%3D%5C%22%E7%A1%AE%20%E5%AE%9A%5C%22%20onclick%3D%5C%22doOk()%5C%22%20%2F%3E%3C%2Fli%3E%5Cn%22%3B%20%0D%0A%20%20%20%20strHtml%20%2B%3D%20%22%3C%2Ful%3E%5Cn%22%3B%20%0D%0A%20%20%20%20alertFram.innerHTML%20%3D%20strHtml%3B%20%0D%0A%20%20%20%20document.body.appendChild(alertFram)%3B%20%0D%0A%20%20%20%20document.body.appendChild(shield)%3B%20%0D%0A%20%20%20%20var%20c%20%3D%200%3B%20%0D%0A%20%20%20%20this.doAlpha%20%3D%20function()%7B%20%0D%0A%20%20%20%20%20%20%20%20if%20(c%2B%2B%20%3E%2010)%7BclearInterval(ad)%3Breturn%200%3B%7D%20%0D%0A%20%20%20%20%20%20%20%20shield.style.filter%20%3D%20%22alpha(opacity%3D%22%2Bc%2B%22)%3B%22%3B%20%0D%0A%20%20%20%20%7D%20%0D%0A%20%20%20%20var%20ad%20%3D%20setInterval(%22doAlpha()%22%2C20)%3B%20%0D%0A%20%20%20%20this.doOk%20%3D%20function()%7B%20%0D%0A%20%20%20%20%20%20%20%20alertFram.style.display%20%3D%20%22none%22%3B%20%0D%0A%20%20%20%20%20%20%20%20shield.style.display%20%3D%20%22none%22%3B%20%0D%0A%20%20%20%20%7D%20%0D%0A%7D%20%0D%0A%3C%2Fscript%3E"> </body> </html>
[Ctrl+A 全选 注:
如需引入外部Js需刷新才能执行
]
教程首页
更多教程