Recuperation de contenu rempli html

[Fermé]
Signaler
Messages postés
44
Date d'inscription
jeudi 6 septembre 2012
Statut
Membre
Dernière intervention
14 mai 2016
-
Bonjour,
j'ai crée un formulaire je veux un script pour affiché le contenu rempli dans une alerte ou un popup merci






<html>
<body>

<title> Formulaire </title>
<table style="width:800px">
<tr>
<td>Civilite </td>
<td id='td1'>
<input type="radio" name="eee" value="male" id="mr">Monsieur
<input type="radio" name="eee" value="mal"id="mm">Madame
<input type="radio" name="eee" value="female"id="mlle">Mademoiselle <br></td>

</tr>
<tr>
<td>Nom / Prenom </td>
<td td='td2'><form action="" method="post"><input type="text" name="firstname" id="nom"><br></td>
</tr>
<tr>
<td>Adresse </td>
<td><TEXTAREA rows="3" name="commentaires" id="adr"> </TEXTAREA></br></td>

<tr>
<td>no postal / localite</td>
<td> <input type="text" name="lastname" id="np">
<input type="text" name="firstname" id="loc"value="Paris">

<br></td>

</tr>

<tr>
<td>Pays </td>
<td><form id='form1'><SELECT name="fonction" id='pays'>
<OPTION VALUE="France" id="alg">Algerie</OPTION>
<OPTION VALUE="france" id="fr">france</OPTION>
<OPTION VALUE="Italie" id="bf">Italie</OPTION>
</SELECT></form></br></td>

</tr>

<tr>
<td> Plateforms :</td>
<td><input type="checkbox" name="Plat" value="win" id="win">Window
<input type="checkbox" name="vehicle" value="Mac" id="mac">Macintosh
<input type="checkbox" name="vehicle" value="Uni" id="unix">Unix<br></td>

</tr>

<tr>
<td>Applications :</td>
<td><SELECT name="fonction1" id='apps' multiple>
<OPTION VALUE="bure" id="bureautique">Bureautiques</OPTION>
<OPTION VALUE="dao"id="dao">DAO</OPTION>
<OPTION VALUE="stat"id="statatistique">Statistiques</OPTION>
<OPTION VALUE="sgbd"id="sgbd">SGBD</OPTION>
<OPTION VALUE="int"id="internet">Internet</OPTION>
</SELECT>
</tr>

</table>
<button onclick=Ecrire() > Soumettre </button>

<button onclick=Ecrire() > Effacer </button>







<style type="text/css">
button {
padding: 3px 30px;
background-color: #FFECEC;
border: 1px solid #990000;
}
button:hover {
background-color: #ECFFEC;
border: 1px solid #009900;
}
</style>








<SCRIPT LANGUAGE="JavaScript">


document.write("")

function afficher()
{
alert(" Hello :)
<img src="">
")
}



</SCRIPT>
</HEAD>


<BODY>
<FORM>
<INPUT type="button" value="Connecter" onclick="afficher()">


</FORM>
</BODY>




<html>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script>
<script type="text/javascript">

$(document).ready(function(){

$("li.one").click( function(){ $
("body").removeClass('bg2 , bg3').addClass("bg1");
});

$("li.two").click( function(){ $
("body").removeClass("bg1 , bg3").addClass("bg2");
});

$("li.three").click( function(){ $
("body").removeClass("bg1 , bg2").addClass("bg3");
});

});

</script>
<style>
.bg1 { background: url(votre_image_içi) repeat; background-color: #6c0000;



color : Blue ;
font-family: Verdana;
font-style: italic;
font-weight:26px;
}

.bg2 {
background: url(http://static.panoramio.com/photos/large/54871317.jpg) repeat; background-color: #5A2A00;
color : black ;
font-family: fantasy;
font-style: bold;
font-weight:22;
}


.bg3 { background: url(votre_image_içi) repeat; background-color: #00345B;
color : red ;
font-family:courier ;
font-style: normal;
font-weight:30; }
</style>
</head>
<body>
<ul>
<li class="one">
<button onclick=Ecrire() > Rouge couleur bleu </button>
<a href="#000000"></a>
</li>
<li class="two">

<button onclick=Ecrire() > Maron couleur noir </button><a href="#00000"></a></li>
<li class="three">
<button onclick=Ecrire() > Bleu couleur rouge </button><a href="#00000"></a></li>
</ul>
</body>

<!DOCTYPE html>
<html lang='fr'>
<head>

<link rel="stylesheet" type="text/css" href="css/imgareaselect-default.css" />
<script type="text/javascript" src="scripts/jquery.min.js"></script>
<script type="text/javascript" src="scripts/jquery.imgareaselect.pack.js"></script>

</head>
<title>Test Canvas File API</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<script type="text/javascript" src='jquery-1.8.1.min.js'></script>
<script type='text/javascript'>

$(function() {
$('#frm input[type="file"]').change(function() {
var file = $(this);
var reader = new FileReader;
reader.onload = function(event) {
var img = new Image();
img.onload = function() {
var width = 180;
var height = 140
var canvas = $('<canvas></canvas>').attr({ width: width, height: height });
file.after(canvas);
var context = canvas[0].getContext('2d');
context.drawImage(img, 0, 0, width, height);
};
img.src = event.target.result;
};
reader.readAsDataURL(file[0].files[0]);
});
});
</script>
<style type='text/css'>
canvas { border: 1px solid #ccc; }
</style>
</head>
<body>
<form id='frm'>
<input type='file' /><br>
</form>
</body>

</html>