Inserer du javascript sur une page html
M0ustiko
-
Celikima -
Celikima -
Bonjour,
J'ai une page javascript dont le code me produit un sondage. J'aurais voulus savoir le code qu'il faut pour l'insérer sur une page html.
Voilà le code :
<!-- debut du code sondage 1001v 1.2 -->
<SCRIPT LANGUAGE="JavaScript">
function desactiveFormv11(f) {
if (document.all || document.getElementById) {
for (i = 0; i < f.length; i++) {
var t = f.elements[i];
if (t.type.toLowerCase() == "submit" || t.type.toLowerCase() == "reset")
t.disabled = true;
}
}
return true;
}
function checkv11(f) {
res = desactiveFormv11(f);
return true;
}
</SCRIPT>
<table cellpadding=2 cellspacing=0 width="130" bordercolorlight="#000000" bordercolordark="#CFFEFB" border="1">
<tr valign="bottom" align="center" bgcolor=#ff6464><td align="center"> <B><FONT face=verdana color=#000000 SIZE=1>Comment trouvez-vous ce site ? </B></td></tr><tr valign="bottom" align="center" bgcolor=#ff6464><td align="center">
<form onSubmit="return checkv11(this)" method="post" action="http://www.1001-votes.com/vote/mvoteres11.php" target='_blank'><TABLE cellpadding=0 cellspacing=0>
<TR>
<TD VALIGN=top>
<input type="radio" name="vote" value="1" style="border-width: 0; background-color: #ff6464" >
</TD>
<TD ALIGN=LEFT>
<FONT face=verdana size=1 color=#000000>Bien</font>
</TD>
</TR>
<TR>
<TD VALIGN=top>
<input type="radio" name="vote" value="2" style="border-width: 0; background-color: #ff6464" >
</TD>
<TD ALIGN=LEFT>
<FONT face=verdana size=1 color=#000000>Médiocre</font>
</TD>
</TR>
<TR>
<TD VALIGN=top>
<input type="radio" name="vote" value="3" style="border-width: 0; background-color: #ff6464" >
</TD>
<TD ALIGN=LEFT>
<FONT face=verdana size=1 color=#000000>Nul</font>
</TD>
</TR>
<TR>
<TD VALIGN=top>
<input type="radio" name="vote" value="4" style="border-width: 0; background-color: #ff6464" >
</TD>
<TD ALIGN=LEFT>
<FONT face=verdana size=1 color=#000000>Classique</font>
</TD>
</TR>
<TR>
<TD VALIGN=top>
<input type="radio" name="vote" value="5" style="border-width: 0; background-color: #ff6464b" >
</TD>
<TD ALIGN=LEFT>
<FONT face=verdana size=1 color=#000000>Original</font>
</TD>
</TR>
</TABLE> <BR> <input type="hidden" name="idv" value="63504">
<input type="hidden" name="lg" value="fr">
<input type="hidden" name="ncom" value="1">
<input type="hidden" name="ce" value="#b0c4de">
<input type="hidden" name="cp" value="#87ceeb">
<input type="hidden" name="pck" value="1001">
<input type="hidden" name="dta" value="3590916081">
<input type="hidden" name="io" value="234">
<input type="hidden" name="ct" value=#000000>
<font size=1>
<INPUT TYPE="submit" VALUE=" Je vote » " onClick="this.value='Vote envoyé'" style="font-size: 10; color:#000000; background-color:#ff6464; border-color:#000000; border-width: 1;" > <BR><BR><a href='http://www.1001-votes.com/vote/mvoteres11.php?idv=63504&lg=fr&ncom=1' target='_blank'><font face=verdana size=1 color=#000000>résultats »</a>
<BR><a href='http://www.1001-votes.com/vote/fond.php?mcat=-1&lg=fr' target='_blank'><font color=#000000></a><BR></td></td>
</table>
</form>
<!-- fin du code sondage 1001v 1.2 -->
Merci de votre aide.
J'ai une page javascript dont le code me produit un sondage. J'aurais voulus savoir le code qu'il faut pour l'insérer sur une page html.
Voilà le code :
<!-- debut du code sondage 1001v 1.2 -->
<SCRIPT LANGUAGE="JavaScript">
function desactiveFormv11(f) {
if (document.all || document.getElementById) {
for (i = 0; i < f.length; i++) {
var t = f.elements[i];
if (t.type.toLowerCase() == "submit" || t.type.toLowerCase() == "reset")
t.disabled = true;
}
}
return true;
}
function checkv11(f) {
res = desactiveFormv11(f);
return true;
}
</SCRIPT>
<table cellpadding=2 cellspacing=0 width="130" bordercolorlight="#000000" bordercolordark="#CFFEFB" border="1">
<tr valign="bottom" align="center" bgcolor=#ff6464><td align="center"> <B><FONT face=verdana color=#000000 SIZE=1>Comment trouvez-vous ce site ? </B></td></tr><tr valign="bottom" align="center" bgcolor=#ff6464><td align="center">
<form onSubmit="return checkv11(this)" method="post" action="http://www.1001-votes.com/vote/mvoteres11.php" target='_blank'><TABLE cellpadding=0 cellspacing=0>
<TR>
<TD VALIGN=top>
<input type="radio" name="vote" value="1" style="border-width: 0; background-color: #ff6464" >
</TD>
<TD ALIGN=LEFT>
<FONT face=verdana size=1 color=#000000>Bien</font>
</TD>
</TR>
<TR>
<TD VALIGN=top>
<input type="radio" name="vote" value="2" style="border-width: 0; background-color: #ff6464" >
</TD>
<TD ALIGN=LEFT>
<FONT face=verdana size=1 color=#000000>Médiocre</font>
</TD>
</TR>
<TR>
<TD VALIGN=top>
<input type="radio" name="vote" value="3" style="border-width: 0; background-color: #ff6464" >
</TD>
<TD ALIGN=LEFT>
<FONT face=verdana size=1 color=#000000>Nul</font>
</TD>
</TR>
<TR>
<TD VALIGN=top>
<input type="radio" name="vote" value="4" style="border-width: 0; background-color: #ff6464" >
</TD>
<TD ALIGN=LEFT>
<FONT face=verdana size=1 color=#000000>Classique</font>
</TD>
</TR>
<TR>
<TD VALIGN=top>
<input type="radio" name="vote" value="5" style="border-width: 0; background-color: #ff6464b" >
</TD>
<TD ALIGN=LEFT>
<FONT face=verdana size=1 color=#000000>Original</font>
</TD>
</TR>
</TABLE> <BR> <input type="hidden" name="idv" value="63504">
<input type="hidden" name="lg" value="fr">
<input type="hidden" name="ncom" value="1">
<input type="hidden" name="ce" value="#b0c4de">
<input type="hidden" name="cp" value="#87ceeb">
<input type="hidden" name="pck" value="1001">
<input type="hidden" name="dta" value="3590916081">
<input type="hidden" name="io" value="234">
<input type="hidden" name="ct" value=#000000>
<font size=1>
<INPUT TYPE="submit" VALUE=" Je vote » " onClick="this.value='Vote envoyé'" style="font-size: 10; color:#000000; background-color:#ff6464; border-color:#000000; border-width: 1;" > <BR><BR><a href='http://www.1001-votes.com/vote/mvoteres11.php?idv=63504&lg=fr&ncom=1' target='_blank'><font face=verdana size=1 color=#000000>résultats »</a>
<BR><a href='http://www.1001-votes.com/vote/fond.php?mcat=-1&lg=fr' target='_blank'><font color=#000000></a><BR></td></td>
</table>
</form>
<!-- fin du code sondage 1001v 1.2 -->
Merci de votre aide.
A voir également:
- Inserer du javascript sur une page html
- Comment supprimer une page sur word - Guide
- Insérer une vidéo sur powerpoint - Guide
- Insérer une signature sur word - Guide
- Imprimer tableau excel sur une page - Guide
- Insérer liste déroulante excel - Guide
6 réponses
Bonjour, faut que tu mettes ca dans ton head :
Cest tout ;)
<script type="text/javascript" src="xxxxxxxxxx"></script>
Cest tout ;)
Non mais tu mets du text/javascript pour mettre du javascript met t'appel un ficher .css
Tu choisit !
Soit tu mets texte/javascript et donc tu met src="sondage.js"
Soit tu mets text/Css et donc tu met src="sondage.css"
Met tu peux pas mélanger les deux !!!
Tu choisit !
Soit tu mets texte/javascript et donc tu met src="sondage.js"
Soit tu mets text/Css et donc tu met src="sondage.css"
Met tu peux pas mélanger les deux !!!
si tu mets une source en .css alors que tu veux du javascript, normal que cela ne marche pas. enlève la source, et laisse juste
<script type="text/javascript"></script>
ou si tu mets ton code Javascript dans un autre fichier, tu met sondage.js et pas .css ;)
<script type="text/javascript"></script>
ou si tu mets ton code Javascript dans un autre fichier, tu met sondage.js et pas .css ;)
Merci, mais bizaremment ca marche pas, j'ai fais un test sur une page blanche toute simple :
<html>
<head>
<title>Untitled Document</title>
<script type="text/javascript" src="sondage.css"></script><br>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
</body>
</html>
<html>
<head>
<title>Untitled Document</title>
<script type="text/javascript" src="sondage.css"></script><br>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
</body>
</html>
Vous n’avez pas trouvé la réponse que vous recherchez ?
Posez votre question
Je crois avoir compris, on fait un include .
<html>
<head>
<title>Untitled Document</title>
<br>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
** comment pourrai-je faire, un appel, pour l'injecté ici merci **
<?php include('/sondage.js'); ?> ** mes sa fonctione pas :-(**
</body>
</html>
<html>
<head>
<title>Untitled Document</title>
<br>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
** comment pourrai-je faire, un appel, pour l'injecté ici merci **
<?php include('/sondage.js'); ?> ** mes sa fonctione pas :-(**
</body>
</html>