当前位置: 首页 > 图文教程 > 网络编程 > Javascript > JavaScript 小技巧(第十集)

Javascript
form中限制文本字节数js代码
use jscript with List Proxy Server Information
use jscript List Installed Software
List Installed Software Features
List Information About the Binary Files Used by an Application
List the Codec Files on a Computer
List the UTC Time on a Computer
List Installed Hot Fixes
excel操作之Add Data to a Spreadsheet Cell
Add Formatted Data to a Spreadsheet
Apply an AutoFormat to an Excel Spreadsheet
JavaScript语法着色引擎(demo及打包文件下载)
类之Prototype.js学习
一款JavaScript压缩工具:X2JSCompactor
iis6+javascript Add an Extension File
jscript之Open an Excel Spreadsheet
jscript之Read an Excel Spreadsheet
jscript之List Excel Color Values
去除图像或链接黑眼圈的两种方法总结
Add a Formatted Table to a Word Document

Javascript 中的 JavaScript 小技巧(第十集)


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

第十集  JAVASCRIPT基础(2)

二、如何执行JaveScript

  Netscape2.0beta3版以上,就可以执行JavaScript的功能了。我们测试过至少beta3版以上可以。目前为止,除了Netscape外,似乎尚没有其他种类的WWW浏览器有此一功能。

  以下我们就以一些例子来告诉你如何将JavaScript写在HTML文件中,并且体会一下新语言的特性。我们从第一个例子开始,如何用JavaScript印出一串文字至HTML文件中。

<html>
<head>
MyfirstJavaScript!
</head>
<body>
<br>
This isanormal HTML document.
<br>
<scriptlanguage="LiveScript">
document.write("这是以JavaScript印出的!")
</script>
<br>
BackinHTMLagain.
</body>
</html>