0
我可以用標籤html內部的jquery關閉模式嗎?我用這樣的代碼之下,但它不工作使用jquery內部標籤html關閉模式
<button class="circle btn btn-danger pull-right" onclick="$(this).dialog('close')">X</button>
更多我的代碼:
<div class="modal fade" id="myModal7" role="dialog">
<div class="modal-dialog">
<!-- Modal content-->
<div class="modal-content">
<button class="circle btn btn-danger pull-right" onclick="$('#myModal7').dialog('close'); ">X</button>
<br>
<form action="<?php echo site_url(); ?>/account_c/uploadPDF" method="post" enctype="multipart/form-data">
<p style="padding-left: 30px; padding-right: 30px; padding-top: 30px;"><span>Certificate Name</span>
<input type="text" name="certificateName" class="form-control" placeholder="Certificate Name" required></p>
<p style="padding-left: 30px; padding-right: 30px; padding-top: 30px;"><span>Upload File</span>
<input type="file" name="pdffile" id="fileUpload" class="form-control" placeholder="Browse" required></p>
<img src=# id="view" alt="your image" style="display:none; width:88px; height:88px; padding-left: 30px;">
<p style="padding-left: 30px; padding-right: 30px; padding-top: 30px;"><input type="submit" name="upload" id="upload2" class="btn btn-info" style=" color:white; " value="Upload"></p>
</form>
</div>
</div>
</div>
在此先感謝
它不起作用。我將其更改爲ID對話框。 – bramadwitra
我用我的代碼更改我的問題。 – bramadwitra
這裏是工作jsfiddle與您的給定的HTML代碼'https:// jsfiddle.net/jignesh221290/wbqswo7o /'試試吧 –