无法让jquery文件上传器出现在页面上 [英] Can't get jquery file uploader to appear on page
问题描述
HTML:
< ; div id =photoclass =additionsDiv>< br />
网址:
< input type =textname =photourlsize =40>< / input>
或
< div id =photoUpload>
< noscript>
< input name =photoUploadtype =filesize =0/>< / input>
< / noscript>
< / div>
< / div>
Javascript:
function addUploaders(){
$('#photoUpload')。fileupload();
};
链接的文件包括:
< link type =text / csshref =libraries / blueimp / css / jquery.fileupload-ui.css rel =stylesheet/>
< script type =text / javascriptsrc =libraries / blueimp / js / jquery.fileupload.js>< / script>
< script type =text / javascriptsrc =libraries / blueimp / js / jquery.fileupload-fp.js>< / script>
< script type =text / javascriptsrc =libraries / blueimp / js / jquery.fileupload-ui.js>< / script>
< script type =text / javascriptsrc =libraries / blueimp / js / main.js>< / script>
如果您正在自定义界面,通过链接设置自定义上传进度条的简约界面。 。 。 。
该插件添加了自定义类的自定义跨度,以显示选定的文件,并准备上传。 。 。 。例如,
。 。检查blueimp demo的源代码
<! - 列出可供上载/下载的文件 - >
< table role =presentationclass =table table-striped>< tbody class =filesdata-toggle =modal-gallerydata-target =#modal-gallery> ;< / tbody的>< /表>
我建议您查看文档,这是非常详细的。 。 。
Okay, I am about to pull my hair out here. I've been trying two different file uploader libraries, Blueimp's jQuery file uploader and Valums file uploader. I can't get an upload button to appear on my page with either of them. I am trying to put it inside of a form within a jQuery accordion div. I must have some problem with my code that's preventing it from showing up in my target div, but I get nothing whatsoever as far as errors in the console. Just nothing shows up. Any ideas? Here's the Blueimp version of my code:
HTML:
<div id="photo" class="additionsDiv"><br />
URL:
<input type="text" name="photourl" size="40"></input>
or
<div id="photoUpload">
<noscript>
<input name="photoUpload" type="file" size="0" /></input>
</noscript>
</div>
</div>
Javascript:
function addUploaders() {
$('#photoUpload').fileupload();
};
Linked files included:
<link type="text/css" href="libraries/blueimp/css/jquery.fileupload-ui.css" rel="stylesheet" />
<script type="text/javascript" src="libraries/blueimp/js/jquery.fileupload.js"></script>
<script type="text/javascript" src="libraries/blueimp/js/jquery.fileupload-fp.js"></script>
<script type="text/javascript" src="libraries/blueimp/js/jquery.fileupload-ui.js"></script>
<script type="text/javascript" src="libraries/blueimp/js/main.js"></script>
if you are customizing the interface you should check out this link on setting minimalistic interface with custom upload progress bar . . . .
The plugin adds custom spans with custom classes to display selected files and prepare them for upload . . . .
for eg . . check this source of blueimp demo
<!-- The table listing the files available for upload/download -->
<table role="presentation" class="table table-striped"><tbody class="files" data-toggle="modal-gallery" data-target="#modal-gallery"></tbody></table>
I suggest you to check out the documentation which is very detailed . . .
这篇关于无法让jquery文件上传器出现在页面上的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!