0

如何在javascript中获取asp fileupload的值。我试过但无法获得两个文件上传的值。

function alertupload() {>  
             var firstvalue = document.getElementById("ctl01_uxPlaceHolder_uxProductFormView_ctl01_uxOptionGroupDetails_uxOptionDataList_ctl00_uxOptionItemDetails_uxOptionUploadItem_uxUploadFile").value;

             var backvalue = document.getElementById("ctl01_uxPlaceHolder_uxProductFormView_ctl01_uxOptionGroupDetails_uxOptionDataList_ctl01_uxOptionItemDetails_uxOptionUploadItem_uxUploadFile").value;

            alert(frontvalue);
            alert(backvalue);              

 }
4

1 回答 1

0

如果ctl01_uxPlaceHolder_uxProductFormView_ctl01_uxOptionGroupDetails_uxOptionDataLi‌​st_ctl00_uxOptionItemDetails_uxOptionUploadItem_uxUploadFileid 那么它应该可以工作。

其他明智的使用客户 ID

var firstvalue = document.getElementById("<%= uxUploadFile.ClientID %>");
alert(firstvalue);
于 2013-11-15T07:27:01.987 回答