$ ("input[name='city']").each(function(i,obj){ //i, the subscript of the iteration, starting from 0 //obj, the current object (HTMLInputElement) , you can use the obj.value format to get the attribute value //$(this); for the current jQuery object, you can use $(this).val() to get the attribute value });
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn