String.prototype.startsWith = function (str) { if (str == null || str == "" || this.length == 0 || str.length > this.length) { return false;
} if (this.substring(0, s.length) == str) { return true;
} else { return false;
} return true;
}### 問題描述問題出現的環境背景及自己嘗試過哪些方法我直接放在script 標簽中不行相關代碼// 請把代碼文本粘貼到下方(請勿用圖片代替代碼)你期待的結果是什么?實際看到的錯誤信息又是什么?
添加回答
舉報
0/150
提交
取消