$("input[name^=hdimg]").each(function(){ }); 关键在于name^=hdimg JQuery的用法确实挺丰富的,难怪不少js或者css插件都依赖于ta,值得深入研究。