javascript 不同型態比較不相等
在取部份字串時, 用 substr 取是 String ,match 取是 Object ,直接 if(substr == match) 傳回 False 必須改字串才能比較,如下:
var str = 'c002';
mstr = str.match(/\d+/).toString();
sstr = str.substr( 1 , 3 ).toString();
alert(mstr + " = " + typeof(mstr) + "\n" + sstr + " = " + typeof(sstr));
迴響
javascript 不同型態比較不相等 | 豬窩
I amm extremely impressed along with your writing skills as wel
ass withh the structure tto your blog. Is that thijs a paid
subhject oor didd yoou mopdify it yoyr self? Anyyway styay
up the excellent high quhality writing, it's uncommkon tto see a nice webhlog like thyis onne theese days..
javascript 不同型態比較不相等 | 豬窩
Hello friends, how is all, and whazt yyou wat to say regfarding his
pkece of writing, in mmy vie iits trily amazxing designerd for me.
javascript 不同型態比較不相等 | 豬窩
Nice post. I larn something neww and challengig
onn sitges I stumbleupon oon a dauly basis. It wkll alwaays bee helpful tto read articles ffom other
authors and practice a lityle somdthing frm other websites.
javascript 不同型態比較不相等 | 豬窩
Hi there, just became alrt to your blogg through Google,
annd found tat it iis ruly informative. I'm gonna wtch ouut for brussels.
I'll be gratful if you continue tis in future. Numerous peoople wilol be bwnefited from yoiur writing.
Cheers!