1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40
| #affichage d'une liste déroulante
#!usr/bin/perl -w
use strict;
open(FICHIER, ">liste_deroulante.html") or die("Erreur d'ouverture");
print(FICHIER "<!DOCTYPE HTML PUBLIC \"-\/\/W3C\/\/DTD HTML 4.01 Transitional\/\/EN\">",
"<html>",
"<head>",
"<title>Affichage d\'une liste déroulante</title>",
"<SCRIPT>",
"<!--",
"var choice = \'\';",
"function Recup() {",
"i = document.Choix.Liste.selectedIndex;",
"if (i == 0) return;",
"choice = document.Choix.Liste.options.value;",
"}",
"\/\/ -->",
"</SCRIPT>",
"</head>",
"<body>",
"<p> </p>",
"<p><strong><font size=\"+3\">Essai de liste déroulante</font></strong></p>",
"<FORM NAME=\"Choix\">",
"<SELECT NAME=\"Liste\" onChange=\"Recup()\">",
"<OPTION VALUE=\"\">Choisir une option",
"<OPTION VALUE=\"mail\">Mail",
"<OPTION VALUE=\"lettre\">Lettre",
"<OPTION VALUE=\"colis\">Colis",
"</SELECT>",
"</FORM>",
"</body>",
"</html>");
close FICHIER; |
Partager