JavaScript正则表达式
字符是计算机软件处理文字时最基本的单位,可能是字母,数字,标点符号,空格,换行符,汉字等等。字符串是0个或更多个字符的序列。文本也就是文字,字符串。说某个字符串匹配某个正则表达式,通常是指这个字符串里有一部分(或几部分分别)能满足表达式给出的条件。
相关文档:
function $id(s) {
return document.getElementById(s);
}
//判断小数
function IsFloat(s) {
if (!/^[+\-]?\d+(.\d+)?$/.test(s))
return false;
else
return ......
1.document.write("");
为
输出语句
2.JS
中的注释为
//
3.
传统的
HTML
文档顺序是
:document->html->(head,body)
4.
一个浏览器窗口中的
DOM
顺序是
:window->(navigator,screen,history,location,document)
5.
得到表单中元素的名称和值
:document.getElementById("
表 ......
10、mootools.js的写类方式
mootools.js的最新版本是1.2.3,这里使用的是1.2.0。mootool被设计成非常紧凑的,模块化的,面向对象的的js库。mootool中写类用Class类。Class类由Native类new出来的:
/*
*Script: Class.js
*/
var Class = new Native({
name: 'Class',
initialize: function(properties){
propert ......