当前位置: 首页 > 图文教程 > 网络编程 > 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-09-12   浏览: 341 ::
收藏到网摘: 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>