字符串行轉換爲int類型。否則加起來爲 01 尷尬
var index = parseInt('0')+1;
數字類型進行比較大小 判斷兩個int類型是否相等
if(eval(index) == eval(imgPath.length))
數字類型
<c:if test="${item.pid eq 0 }"> //相等,若是字符串類型的話需要添加 ""
example:<c:if test="${item.name eq '張三’}”
<c:if test="${item.url ne '' } //不等於空
或者直接在js中判斷
if(data.res == "abnormal_type01")
判斷一個input標籤 value 是否爲undefined,若爲空會直接進入該條件
var photoUrls=$("#photoUrls").val();
if(!photoUrls){
}