String.prototype.bool = function() { return (/^true$/i).test(this); }; console.log(“true”.bool());. 以上這篇JS字串false轉boolean的方法(推薦) ...
確定! 回上一頁