0

这是我的 cshtml 代码,用于上传 imageFile 出现错误:

<div class="control-group">                                                   <label class="control-label"for="inputName"><i class="icon-user"></i>Company Logo</label>
<div class="controls">
<input id="BtnImg" type="file" class="uploadfile" name="Photo" onchange="imagepreview(this);" />
<span id="spError1" class="error"></span>

<img id="imgprw" src="~/images/profile.jpg" style="width:130px; height:130px" />
</div>
 </div>   
4

1 回答 1

0

该错误意味着您的页面中不存在“imagepreview”功能。您需要包含实现此脚本的文件或在此页面中定义脚本才能使其正常工作。

请参阅此页面了解更多信息。 https://javascriptweblog.wordpress.com/2010/08/16/understanding-undefined-and-preventing-referenceerrors/

于 2015-07-23T04:58:14.610 回答