View:
<div id="container">
<form id="myForm" action="/Text/FromPost_1" method="post" enctype="multipart/form-data">
<p class="img_P"><img id="previewPic" name="previewPic"style="width:100px;height:100px" /></p>
<p><input type="file" id="imgUpload" name="imgUpload" οnclick="read()"/></p>
<p><button id="submitBtn" type="submit" value="提交">提交</button></p>
</form>
</div>
<script>
//图片浏览
function read() {
$('#imgUpload').on('change', function () {
var file = this.files[0];
if (this.