我有一个这样的母版页:
...
<head id="Head1" runat="server">
<asp:ContentPlaceHolder ID="HeadContent" runat="server" />
</head>
...
在我的 Aspx 页面中:
...
<asp:Content ID="HeadContentFromPage" ContentPlaceHolderID="HeadContent" runat="server">
<link rel="Stylesheet" type="text/css" href="uploadify.css" />
<script src="jquery-1.3.2.min.js" type="text/javascript"></script>
<script src="uploadify.v2.1.0.min.js" type="text/javascript"></script>
<script type="text/javascript">
jQuery.noConflict();
jQuery(document).ready(function() {
jQuery("#<%=fupImagem.ClientID %>").fileUpload({
'uploader': 'uploadify.swf',
'cancelImg': 'cancel.png',
'buttonText': 'Browse Files',
'script': 'Uploader.ashx',
'folder': 'uploads',
'fileDesc': 'Image Files',
'fileExt': '*.jpg;*.jpeg;*.gif;*.png',
'multi': true,
'auto': true
});
}
);
</script>
</asp:Content>
...
<asp:FileUpload ID="fupImage" runat="server" CssClass="txtBig" />
...
加载该页面时出现错误:
错误:jQuery("#ctl00_ContentPlaceHolder1_fupImagem").fileUpload 不是函数
知道出了什么问题吗?
保罗
最佳答案
jQuery("#<%=fupImagem.ClientID %>").uploadify({
在2.0.0版本中从fileUpload
更改为uploadify
。请参阅changelog :
Function changed to uploadify()
fileUpload() – uploadify()
fileUploadStart() - uploadifyUpload()
fileUploadSettings() - uploadifySettings()
fileUploadCancel() - uploadifyCancel()
fileUploadClearQueue() – uploadifyClearQueue()
关于asp.net - 在 ASP.Net 中使用 Uploadify 插件(JQuery)时出现问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1362911/