Communauté Informatique NDFR.net : FTP ouvert/fermé - Discussions
Reply
FTP ouvert/fermé
Thread Tools Display Modes
  #1  
Old 21-12-2002, 08:07
enzo19's Avatar
enzo19 enzo19 is offline
Powered by NDFR
 
Join Date: 19-10-2002
Location: Brive - Corrèze
Age: 49
Posts: 1,749
Adapte le code ci-dessous selon tes désirs

¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤
¤Entre Head et Head ¤
¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤

<SCRIPT language="JavaScript" title="ndfr">
<!-- Begin
function Login(form) {
var username = form.username.value;
var password = form.password.value;
var server = form.server.value;
if (username && password && server) {
var ftpsite = "ftp://" + username + ":" + password + "@" + server;
window.location = ftpsite;
}
else {
alert("Veuillez entrer votre nom d'usager, mot de passe et adresse FTP du serveur.");
}
}
// End -->
</SCRIPT>

¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤
¤Entre Body et Body ¤
¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤

<SCRIPT language="JavaScript" title="ndfr">
</SCRIPT>
<div align="center">
<form name=login>
<table width=250 border=1 cellpadding=3>
<tr>
<td colspan=2 align=center><b><h2>Connexion à un serveur FTP !</h2></b></td>
</tr>
<tr>
<td>Nom d'usager :</td>
<td><input type=text name=username size=20></td>
</tr>
<tr>
<td>Mot de passe :</td>
<td><input type=password name=password size=20></td>
</tr>
<tr>
<td>Serveur :</td>
<td><tt>ftp://</tt><input type=text name=server size=14></td>
</tr>
<tr>
<td colspan=2 align=center>
<input type=button value="Connexion au FTP" onClick="Login(this.form)"></td>
</tr>
</table>
</form>
</div>

¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤

Avec le script entre head et head, tu peux sans problème attaquer le champ où il y a l'adresse ftp ok... et ca marche même sous asp, php... et HTML et sous toutes les versions IE depuis la v4
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT +2. The time now is 12:07.

Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.