在这个 Jquery 函数中,我想启用一个浏览按钮,但我做不到。按钮ID是ctl00_ContentPlaceHolder1_fupSendNewDocument
<script language="javascript" type="text/javascript">
function pageLoad() {
$(function () {
/********************************************Open and close model window for File Upload*********************************/
$('#divAttach').click(
function () {
var filedivcount = $('div').filter('#MultiFilelabel1').length;
var $btn = $('#divAttach');
var count = ($btn.data("click_count") || 0) + 1;
$btn.data("click_count", count);
$("#ctl00_ContentPlaceHolder1_fupSendNewDocument").attr("disabled", false);
if ($('input').filter('#ctl00_ContentPlaceHolder1_fupSendNewDocument_F1').length > 0) {
if (count < 3 || filedivcount < 3) {
document.getElementById('ctl00_ContentPlaceHolder1_fupSendNewDocument_F1').click();
} else {
alert('you can upload only 3 files');
}
}
if ($('input').filter('#ctl00_ContentPlaceHolder1_fupSendNewDocument_F4').length > 0) {
if (count < 3 || filedivcount < 3) {
document.getElementById('ctl00_ContentPlaceHolder1_fupSendNewDocument_F4').click();
} else {
alert('you can upload only 3 files');
}
} else {
if (count < 3 || filedivcount < 3) {
document.getElementById('ctl00_ContentPlaceHolder1_fupSendNewDocument').click();
} else {
alert('you can upload only 3 files');
}
}
}
);
});
}
</script>