当前位置: 首页 > 网络学院 > 客户端脚本教程 > JavaScript > JS 实例

JavaScript
JS数学对象参考
JS字符串对象参考
JS函数参考
JS事件参考
Javascript 常用正则表达式
FF和IE下的js兼容性问题
jQuery 简单介绍
jQuery / 核心 / $(expression, [context] ) 函数
jQuery / 核心 / $(html) 函数
如何使用JS来判断浏览器类型(ie、firefox,等等)
Javascript在IE和FireFox中的不同表现
3个js字符编码函数区别
javascript 中的 XMLDOM 对象

JavaScript 中的 JS 实例


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

JavaScript 基础实例

Write text with JavaScript
使用JS来书写文字
Format text with HTML tags
配合HTML标签来格式化文字
JavaScript in the head section
在head区域的JS
JavaScript in the body section
在body区域的JS
An external JavaScript
外部导入的JS
Declare a variable, assign a value to it, and display it
声明变量,给它赋值,并显示值
If statement
if 声明
If...else statement
if ...else 声明
Random link
随机连接
Switch statement
Switch 声明
Alert box
警示框
Alert box with line breaks
带换行的警示框
Confirm box
确认框
Prompt box
提交框
Call a function
调用函数
Function with an argument
带有变量的函数
Function with an argument 2
带有变量的函数2
Function that returns a value
能返回值的函数
Function with arguments, that returns a value
带变量还能返回值的函数
For loop
For 循环
Looping through HTML headers
循环HTML标题
While loop
While 循环
Do While loop
Do While 循环
Break a loop
跳出循环
Break and continue a loop
跳出并继续循环
Use a for...in statement to loop through the elements of an array
使用 for...in 声明将元素内的数组循环一遍
The try...catch statement
try...catch 声明
The try...catch statement with a confirm box
带有确认框的 try..catch 声明
onerror 事件

JavaScript 高级实例

Detect the visitor's browser and browser version
检测出访问者的浏览器以及浏览器的版本
More details about the visitor's browser
更多有关访问者了浏览器的信息
All details about the visitor's browser
所有有关访问者浏览器的信息
Alert user, depending on browser
依据浏览器的不同给用户不同的警示
Create a welcome cookie
建立一个友好的欢迎cookie
Button animation
按钮动画
Image map with added JavaScript
用JS来给图片加上可点区域
Simple timing
简单的计算时间
Another simple timing
另一种计算时间
Timing event in an infinite loop
无限循环的计时
Timing event in an infinite loop - with a Stop button
带有停止按钮的无限循环计时
A clock created with a timing event
通过timing事件制作而成的时钟效果
Create a direct instance of an object
建立对象
建立临时对象

评论 (0) All

登陆 | 还没注册?