Home > Web Front-end > JS Tutorial > Code example for obtaining file upload URLs in multiple JavaScript forms

Code example for obtaining file upload URLs in multiple JavaScript forms

高洛峰
Release: 2016-11-28 09:52:45
Original
1186 people have browsed it

Suppose there are multiple forms in a web page, and one of the forms has file upload,

[html]

< form action='...' ... >

...

...

. ..

The question is how to get this file uploaded What about the URL?

The following is a JavaScript code example

[javascript]

function showUploadUrl() {

for(var i=0; i

var form = document.forms[ i];

                                                                                                                                                                                                                 ​ Is: " + form.action);

                                                                                                                             

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