Home > Web Front-end > HTML Tutorial > Write HTML code to log in to the specified FTP_html/css_WEB-ITnose

Write HTML code to log in to the specified FTP_html/css_WEB-ITnose

WBOY
Release: 2016-06-24 12:08:06
Original
1529 people have browsed it


ftp://www.abc123.cn
Account use password pass

I see a lot of them online. But it is necessary to fill in the ftp://. Now I just want to write www.abc123.com directly. I only need to write the login account and password.

I don’t know how to write it. I hope someone who knows can write it down directly for me.

Write a simple web page (index.html), the content is to enter the user name and password to log in to "FTP".

After pressing "Login", use JScript to go to the address ftp://user:pass@www.abc123.cn.


Reply to discussion (solution)

See if this works

<script>  function logFtp(){	var user=document.getElementById("username").value;	var pass=document.getElementById("pass").value;	var ftpdomain="www.abc123.cn";	location.href="ftp://"+user+":"+pass+"@"+ftpdomain;  }  </script>  <input type="text" id="username" name="username"/>  <input type="text" id="pass" name="pass"/>  <input type="button" value="登陆" onclick="logFtp();"/>
Copy after login

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