当前位置: 首页 > 图文教程 > 网络编程 > Javascript > JavaScript 权威指南(第四版) 读书笔记

Javascript
Add a Table to a Word Document
Add Formatted Text to a Word Document
用jscript实现新建word文档
用jscript实现新建和保存一个word文档
Open and Print a Word Document
Use Word to Search for Files
Convert Seconds To Hours
Sample script that deletes a SQL Server database
Sample script that displays all of the users in a given SQL Server DB
firefox中用javascript实现鼠标位置的定位
div+css实现鼠标放上去,背景跟图片都会变化。
Locate a File Using a File Open Dialog Box
Save a File Using a File Save Dialog Box
用jscript实现列出安装的软件列表
List the Stored Procedures in a SQL Server database
Display SQL Server Login Mode
Display SQL Server Version Information
List all the Databases on a SQL Server
用jscript启动sqlserver
Stop SQL Server

Javascript 中的 JavaScript 权威指南(第四版) 读书笔记


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

JavaScript 权威指南(第四版) 读书笔记,大家可以看看。 Javascript是无类型、解释型语言
对大小写敏感
html对大小写不敏感
忽略空格符、制表符、换行符(关键字、变量、正则表达式 除外)
";"分号可选择
//单行注释
/*多行注释*/
标示符 开头必须是字母、下划线、$符号
关键字: break delete function return typeof
case do if switch var
catch else in this void
continue false instanceof throw while
debugger finally new true with
default for null try
function(函数),是可执行代码的对象
有序集合<=>集合
boolean isNaN(numValue) ///numValue 有意义返回false,无意义则返回true
转义字符 序 转义字符 使用说明
1 \b 后退一格(Backspace)
2 \f 换页(Form Feed)
3 \n 换行(New Line)
4 \r 返回(Carriage Return)
5 \t 制表(Tab)
6 \' 单引号
7 \" 双引号
8 \\ 反斜线(Backslash)
疑问:"\0“ 为Null字符 document.write("\0") 测试
复制代码 代码如下:

/*字符(串)截取*/
<script language="javascript">
var str="abcdefghi";
/*返回指定索引位置处的字符*/
document.write(str.charAt(2)+"\t");
///返回值 c
/*substring 方法将返回一个包含从 start 到最后(不包含 end )的子字符串的字符串*/
document.write(str.substring(2,5)+"\t");
///返回值 cde
/*返回一个从指定位置开始的指定长度的子字符串stringvar.substr(start [, length ])*/
document.write(str.substr(2,4)+"\t");
///返回值 cdef
</script>