js 判斷兩字符串是否相等, 不區分大小寫

js 判斷兩字符串是否相等, 不區分大小寫 <script> String.prototype.compare = function(str) { //不區分大小寫 if(this.toLowerCase() == str.toLowerCase()) {    return "1"; // 正確 } else{    return "0"; // 錯誤 } } alert("ABCDefg".c
相關文章
相關標籤/搜索