摘要:
1 <!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.0//EN" "http://www.wapforum.org/DTD/xhtml-mobile10.dtd">2 <?xml version="1.0" encoding="utf-8"?>3 <!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.0//EN" "http://www.w 阅读全文
摘要:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=utf- 阅读全文
摘要:
1 <!doctype html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 2 <html xmlns="http://www.w3.org/1999/xhtml"> 3 <head> 4 <meta http-equiv="Content-Type" content="text/html; c 阅读全文
摘要:
/*** 对JSON对象转换为字符串.* @param {json对象} json* @return {json字符串}*/function jsonObj2Str(json) { var str = "{"; for (prop in json) { str += prop + ":" + json[prop] + ","; } str = str.substr(0, str.length - 1); str += "}"; return str;}/*** 将json字符串转... 阅读全文
摘要:
Math对象 1. Math.abs(num) : 返回num的绝对值 2. Math.acos(num) : 返回num的反余弦值 3. Math.asin(num) : 返回num的反正弦值 4. Math.atan(num) : 返回num的反正切值 5. Math.atan2(y,x) : 返回y除以x的商的反正切值 6. Math.ceil(num) : 返回大于num的最小整数 7. Math.cos(num) : 返回num的余弦值 8. Math.exp(x) : 返回以自然数为底,x次幂的数 9. Math.floor(num) : 返回小... 阅读全文
摘要:
字符串(String) 1.声明 var myString = new String("Every good boy does fine."); var myString = "Every good boy does fine."; 2.字符串连接 var myString = "Every " + "good boy " + "does fine."; var myString = "Every "; myString += "good boy does fine 阅读全文
摘要:
日期型(Date) 1.声明 var myDate = new Date(); //系统当前时间 var myDate = new Date(yyyy, mm, dd, hh, mm, ss); var myDate = new Date(yyyy, mm, dd); var myDate = new Date("monthName dd, yyyy hh:mm:ss"); var myDate = new Date("monthName dd, yyyy"); var myDate = new Date(epochMilliseco... 阅读全文
摘要:
数字型(Number) 1.声明 var i = 1; var i = new Number(1); 2.字符串与数字间的转换 var i = 1; var str = i.toString(); //结果: "1" var str = new String(i); //结果: "1" i = parseInt(str); //结果: 1 i = parseFloat(str); //结果: 1.0 //注意: parseInt,parseFloat会把一个类似于"32... 阅读全文