Home  >  Article  >  Web Front-end  >  HTML写个登陆指定FTP的代码_html/css_WEB-ITnose

HTML写个登陆指定FTP的代码_html/css_WEB-ITnose

WBOY
WBOYOriginal
2016-06-24 12:08:061482browse

 
ftp://www.abc123.cn 
账号use密码pass

看到网上有很多这样的。但是就是ftp:// 这个后面要填写,我现在就是想写www.abc123.com直接写进去,只要写登陆的账号 密码。

不知道怎么写。希望懂的人能直接帮我写下。

写一个简单网页(index.html),内容是输入用户名和密码,登录“FTP”。

在按“登录”后,用JScript转到 ftp://user:pass@www.abc123.cn 地址上去。


回复讨论(解决方案)

看这样行不

<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();"/>

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