probléme avec les fonctions dans jsp
salut mes amis j'utilise jsp sous eclipse
beh ma probleme que je sais pas pkoi ce code ne marche pas
il me donne une page la ou il me dis ya une erreur
Citation:
<html>
<head><title>Test of heading method</title>
</head>
<body>
<script LANGUAGE="JavaScript" type="text/javascript">
// define the functions
function PrintCard() {
line1 = "<b>Name: </b>" + this.name + "<br>\n";
line2 = "<b>Address: </b>" + this.address + "<br>\n";
line3 = "<b>Work Phone: </b>" + this.workphone + "<br>\n";
line4 = "<b>Home Phone: </b>" + this.homephone + "<hr>\n";
document.write(line1, line2, line3, line4);
}
function Card(name,address,work,home) {
this.name = name;
this.address = address;
this.workphone = work;
this.homephone = home;
this.PrintCard = PrintCard;
}
// Create the objects
sue = new Card("Sue Suthers", "123 Elm Street", ldquo;555-1234",
"555-9876");
phred = new Card("Phred Madsen", "233 Oak Lane", "555-2222",
"555-4444");
henry = new Card("Henry Tillman", "233 Walnut Circle", "555-1299"
, "555-1344");
// And print them
sue.PrintCard();
phred.PrintCard();
henry.PrintCard();
</script>
</body>
</html>
c'est un code simple beh vraiment ca pas marché de tout malgre que je l'ai pris d'un livre