Maison  >  Article  >  interface Web  >  HTML写个登陆指定FTP的代码_html/css_WEB-ITnose

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

WBOY
WBOYoriginal
2016-06-24 12:08:061482parcourir

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

Déclaration:
Le contenu de cet article est volontairement contribué par les internautes et les droits d'auteur appartiennent à l'auteur original. Ce site n'assume aucune responsabilité légale correspondante. Si vous trouvez un contenu suspecté de plagiat ou de contrefaçon, veuillez contacter admin@php.cn