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

Help: About js problem_html/css_WEB-ITnose

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-24 12:15:41
Original
1001 people have browsed it

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


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()"/>
Copy after login

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




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

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.

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template