把$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();
? ? ? ? });