var sobj = new string('abc');
var sobj =new string('abc');var s=sobj+'def';document.write(s);/*輸出:abcdef*/
var sobj1=new string('abc');var sobj2=new string('abc');>>sobj1==sobj2>>false>>sobj1===sobj2>>false
var sobj1=new string('abc');var sobj2=new string('abc');>>sobj1+''==sobj2+''>>true>>sobj1+''===sobj2+''>>true
var sobj=new string('abc');var s=abc;>>sobj==s>>true>>sobj===s>>false
var s=new string('abc');>>typeof(s)>>stringvar s=new string(47);>>typeof(s)>>string
var s=new string('abc');var s2=s.toUpperCase();document.write(s,s2);/*輸出:abcABC*/s[0]='A';document.write(s);/*輸出:abc*/
參考書籍資料:
javascript
一、javascript編程全解http://www.ituring.com.cn/book/1140java
二、javascript 嶽英俊http://pan.baidu.com/s/1eQlegKE編程