Ms7 Search
Google 搜尋 翻譯
calendar
« 五月 2025 »
      1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31  
近期文章
文章分類
網站連結
Syndicate

« | »

javascript 不同型態比較不相等

2020-07-07 @ 20:46 in PHP, JavaScript, Sql

在取部份字串時, 用 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..

作者 dasporno @ 21:01, 2024-11-27

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.

作者 javsafari.com @ 12:44, 2024-12-04

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.

作者 xnxxrush.com @ 21:58, 2025-04-27
«上一篇   1 2 3
發表迴響
 authimage