Add scripts to HTML pages to make them more dynamic and interactive.
加上脚本来让HTML更具动态性和交互性
Examples
例子
Insert a script
插入一脚本
This example demonstrates how to insert a script into your HTML document.
演示怎样在你的页面里插入脚本
Work with browsers that do not support scripts
不支持脚本的浏览器
This example demonstrates how to handle browsers that do not support scripting.
演示怎样针对那些不支持脚本的浏览器做些处理
Insert a Script into HTML Page
在HTML页中插入脚本
A script in HTML is defined with the
The script above will produce this output:
上面的脚本会生成:
Hello World!
Note: To learn more about scripting in HTML, visit our JavaScript School.
注意:学习更多的HTML脚本,请访问JavaScript School.
How to Handle Older Browsers
怎样处理老的浏览器
A browser that does not recognize the
VBScript:
The Tag
标签
In addition to hiding the script inside a comment, you can also add a tag.
除在注释里隐藏脚本,你还可以添加一个标签.
The tag is used to define an alternate text if a script is NOT executed. This tag is used for browsers that recognize the
Your browser does not support JavaScript!
VBScript:
Your browser does not support VBScript!
Script Tags
脚本标签
Tag
标签
Description
描述
Defines a script
定义一个脚本
Defines an alternate text if the script is not executed
定义说明
Defines an embedded object
定义布置对象
Defines run-time settings (parameters) for an object
设置对象
Deprecated. Use instead
不推荐。

