通过innerHTML简化脚本
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Example:InnerHTML</title>
<script type="text/javascript">
function noscript()
{
if(!document.getElementById||!document.createTextNode){return;}
var noJSmsg=document.getElementById('noscripting');
if(!noJSmsg){return;}
var replaceMessage='<h1>Browser test succeeded(From InnerHTML)<h1>';
replaceMessage='<p>We tested if your browser is capable of ';
replaceMessage+='supporting the application,and all checked out fine.';
replaceMessage+='Please proceed by activating the following link.</p>';
replaceMessage+='<p><a href="application.aspx"> Proceed to application</a></p>';
noJSmsg.innerHTML=replaceMessage;
}
window.onload=noscript;
</script>
</head>
<body>
<p id="noscripting">
We are sorry,but this application needs JavaScript to be
enabled to work.Please <a href="contact.html">contact us</a>
if you cannot enable scripting and we will try to help you in
other ways
</p>
</body>
</html>
ERROR:
最新文章
- [开源].NET数据库访问框架Chloe.ORM
- pushState()、popstate事件配合ajax实现浏览器前进后退页面局部刷新
- cometd使用-bayeux协议(读法:贝叶)
- Linux驱动之准备
- 小菜鸟带着梦想学chromium
- Windows Live Writer的Markdown插件MarkdownInLiveWriter支持语法高亮了
- mac终端 使用摘要
- android 常用方法集合
- chromedriver与chrome版本映射表
- Note of Jieba ( 词云图实例 )
- 【学亮IT手记】使用Map代替switch...case语句
- Luogu 2668 NOIP 2015 斗地主(搜索,动态规划)
- eclipse指定jdk路径
- 如何验证 Email 地址:SMTP 协议入门教程
- c++ 查找容器中不满足条件的元素,返回iterator(find_if_not)
- spring boot开启事务管理,使用事务的回滚机制,使两条插入语句一致
- HTML之页面镶嵌体验
- iOS跳转到Touch ID设置界面
- JS 获取指定日期的前几天,后几天
- Spark 加载数据库mysql表中数据进行分析