当前位置: 首页 > 图文教程 > 网络编程 > 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的一些总结


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

对于新手是个不错的必须要理解的东西 今天学习js的收获和小总结:
脚本在什么时候执行:
1、打开页面时执行脚本
当浏览器打开一个HTML文档时,它会从头开始解释整个文档,包括HTML标签和脚本。如果脚本中有可以直接执行的语句,则会在遇到的时候马上解释执行。如:
<script type="text/javascript">
<!--
alert("这是我的第一个脚本")
-->
</script>
2、利用ONLOAD事件执行脚本
onload事件是一个页面在浏览器中打开时发生的,应该方法常用于在打开一个页面的同时向用户显示一些消。
<script type="text/javascript">
<!--
function myr(){
alert("加载的时候显示")
}
-->
</script>
<body onload=myr()>
我很高兴中国得了16个金牌了
</body>
3、通过用户事件执行脚本
比如移动鼠标、点击链接、等行为产生相应的事件。
onlick="alert("这是错误的")"