把$fileField = $('<input type="file" name="thumbs[]"/>');改成对话框$fileField=prompt("请输入商品图片的超链接","http://");下面该怎么修改?
$(document).ready(function(){
$("#selectFileBtn").click(function(){
$fileField = $('<input type="file" name="thumbs[]"/>');
/*$fileField.hide();*/
$("#attachList").append($fileField);
$fileField.trigger("click");
$fileField.change(function(){
$path = $(this).val();
$filename = $path.substring($path.lastIndexOf("\\")+1);
$attachItem = $('<div class="attachItem"><div class="left">a.gif</div><div class="right"><a href="#" title="删除附件">删除</a></div></div>');
$attachItem.find(".left").html($filename);
$("#attachList").append($attachItem);
});
});
$("#attachList>.attachItem").find('a').live('click',function(obj,i){
$(this).parents('.attachItem').prev('').remove();
$(this).parents('.attachItem').remove();
});