Article From:https://www.cnblogs.com/xuchao0506/p/9970496.html

Simple Description: Value in the IMG tag stores the value needed, but when I get it in js, I write directly $(” imgStr”). val (), which turns out to be empty, and after checking it later, I know that the value of img needs att.R to get

Code:

//jsCode
var result = new Array();
$(".imgTofile").each(function(){
var test = $(this).attr("value");
result.push(test);
}); 

 Summary: I really don’t know how the value in the IMG tag was picked up…

Link of this Article: Value acquisition in img Tags

Leave a Reply

Your email address will not be published. Required fields are marked *