簡單描述:在img標簽里的value存放了需要用到的值,但是在js中獲取的時候,我直接寫的就是$("#imgStr").val(),結果發現是空,后來查了一下,才知道,img的value需要使用attr來獲取
代碼:
//js代碼
var result = new Array();
$(".imgTofile").each(function(){
var test = $(this).attr("value");
result.push(test);
});?
?總結:我還真不知道img標簽里的value是這么取到的。。。。。。