我已经动态加载了带有按钮的字段,例如
<input class="upload_image_23" type="text" size="36" name="products_image_large_new_23" value="" />
<input class="upload_image_button_24" type="button" value="Upload Image" />
<input class="upload_image_23" type="text" size="36" name="products_image_large_new_23" value="" />
<input class="upload_image_button_24" type="button" value="Upload Image" />
upload_image_button_[any-number]
现在我想为所有人修改这个 jquery 函数products_image_large_new_[any-number]
jQuery(document).ready(function() {
jQuery('.upload_image_button_[any-number]').click(function() {
formfield = jQuery('.upload_image_[any-number]').attr('name');
tb_show('', 'media-upload.php?type=image&TB_iframe=true');
return false;
});
window.send_to_editor = function(html) {
imgurl = jQuery('img',html).attr('src');
jQuery('.upload_image_[any-number]').val(imgurl);
tb_remove();
}
});
我应该包括[any-number]
什么?