Home >Web Front-end >HTML Tutorial >Help: About js problem_html/css_WEB-ITnose

Help: About js problem_html/css_WEB-ITnose

WBOY
WBOYOriginal
2016-06-24 12:15:41973browse

Use JS to write a function for uploading images. How to use 714779e36f6b8fe3da1575391740131b?


Reply to discussion (solution)

Writing in JS, do you want it to be asynchronous?

Well,
I only use the FileUpload control to write, and now I want to use the html control to implement the image upload function

<img  src=""/〉<input type="file"/><input type="button" value="上传图片" onclick="upload()"/>

When you click to upload an image, save it in the specified file. And determine whether it is an image format. If it does not prompt an error message, after the upload is successful, img will display the uploaded photo
How to write this upload? Or is there any other method

19a1d68ad532240361530a1b485853db
8042c40b8b16948911a6f21d88154d0b

Backend
Request.Files["file1"].SaveAs()

714779e36f6b8fe3da1575391740131b in IE It is different from the styles on Google and Firefox. Please pay attention to the compatibility of the browser when using it.

This is not what js can do.

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn