var json = '{"result":true,"count":1}', obj = JSON.parse(json); alert(obj.count);
正則替換手機號碼
var str = "13113668890"; var res = str.replace(/([0-9]{1,3})([0-9]{1,4})([0-9]{1,4})/, "$1****$3");