当前位置: 首页 > 网络学院 > 网页制作基础教程 > HTML > HTML <noscript>标签

HTML
HTML 介绍
HTML 元素
HTML 基本标签
HTML 格式
HTML 实体字符
HTML 链接
HTML 框架
HTML 表格
HTML 列表
HTML 表单
HTML 图片
HTML 背景
HTML 颜色
HTML 颜色值
HTML 颜色名
HTML 便条
HTML 布局
HTML 字体
HTML 4.0
HTML 样式

HTML <noscript>标签


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-03-04   浏览: 314 ::
收藏到网摘: n/a

定义与用法

The noscript element is used to define an alternate content (text) if a script is NOT executed.
noscript元素的用途就是当脚本无法执行的时候定义可用来做为替换的文字内容。

This tag is used for browsers that recognizes the <script> tag, but does not support the script in it.
这个标签是针对那些可以识别<script>标签,但却无法支持里面的脚本的浏览器。


在HTML和XHTML中的区别

NONE


提示与注意点

Note: If a browser supports scripting, it will not display the text in the noscript element.
注意:如果浏览器支持脚本,就不会显示在noscript里的文字了

Note: Browsers that do not recognize the <script> tag will display the tag's content as text on the page. To prevent the browser from doing this, you should hide the script in comment tags. An old browser (one that does not recognize the <script> tag) will ignore the comment and will not write the tag's content on the page, while a new browser will understand that the script should be executed, even if it is surrounded by comment tags!
注意:浏览器如果无法识别<script>标签,那么里面的内容会以文字的形式显示在页面上,如要避免出现这类情况,你可以在脚本外加上注释标签。


实例

JavaScript:
<body>
...
...
<script type="text/javascript">
<!--
document.write("Hello World!")
//-->
</script>
<noscript>Your browser does not support JavaScript!</noscript>
...
...
</body>

VBScript:
<body>
...
...
<script type="text/vbscript">
<!--
document.write("Hello World!")
'-->
</script>
<noscript>Your browser does not support VBScript!</noscript>
...
...
</body>



标准属性

id, class, title, style, dir, lang, xml:lang

For a full description, go to Standard Attributes.
查看完整的属性

事件属性

NONE


尝试与演示

Work with browsers that do not support scripts
How to handle browsers that do not support scripting.
怎样处理那些无法支持脚本的浏览器

评论 (0) All

登陆 | 还没注册?