我正在尝试使用php自动关注bootstrap模式,它是否可以正常运行代码,
<div class="modal inmodal fade" id="upload_file" tabindex="-1" role="dialog" aria-hidden="true">
<div class="modal-dialog modal-sm">
<div class="modal-content animated rotateIn">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span><span class="sr-only">Close</span></button>
<h4 class="modal-title">Add File</h4>
</div>
<form id="my-awesome-dropzone" class="dropzone" action="" enctype="multipart/form-data" method="post">
<div class="modal-body">
<input type="text" id="file_name" class="form-control" placeholder="Enter File Name" style="width:100%;" name="file_name" required="">
<br/>
<div class="radio radio-success radio-inline">
<input type="radio" id="inlineRadio1" value="1" name="can_down" checked="">
<label for="inlineRadio1"> Open Access </label>
</div>
<div class="radio radio-success radio-inline">
<input type="radio" id="inlineRadio2" value="2" name="can_down">
<label for="inlineRadio2"> Restricted</label>
</div>
<br/>
<br/>
<input type="file" class="form-control" placeholder="Enter File Name" style="width:100%;" id="f_n" name="f_n" required="" onchange="checkFile();">
<p style="font-size:11px; padding-top:10px; color:red; margin-bottom:-25px; text-align:justified;">
* Please note that if you restrict access you can able to upload only <strong>pdf, ods, odt</strong> documents and user's can't download the file.
</p>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-white" data-dismiss="modal">Close</button>
<button type="submit" class="btn btn-primary" id="add_man" name="add_file">Save changes</button>
</div>
</form>
</div>
</div>
</div>
<script>
$(document).ready(function(){
$('#upload_file').on('shown.bs.modal', function() {
$(this).find('#file_name').focus();
});
});
</script>
在图像的第一部分它正常工作,但没有第二部分我不知道我犯了哪个错误,两者都在同一页面上使用动态网址这可能是造成这个问题的原因人