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 41 42 43 44 45 46 47 48 49 50 51
|
<html>
<head>
<title>Personnaliser votre thème</title>
<script type="text/javascript" src="jquery-1.4.2.js"></script>
<script type="text/javascript" src="jscolor/jscolor.js"></script>
<script type="text/javascript">
$().ready(function() {
$("#save").bind('click', function() {
var css,bgcol,photo,sizetext,textcol;
bgcol = "#"+$("#bgcol").val();
photo = $("#photo").val();
sizetext = $("#sizetext").val()+'em';
alert(sizetext);
textcol = "#"+$("#textcol").val();
//css = "body{background-color:"+bgcol+";font-size:"+sizetext+";color:"+textcol+";background-image:url("+photo+");}";
//alert(css);
$.ajax({
url : "css.php",
data : "bgcol="+bgcol+"&sizetext="+sizetext+"&textcol="+textcol+"&photo="+photo,
success : function(data) {
if(data == 0) {
alert('ok');
}
}
});
//$("body").css('background-color',bgcol).css('font-size',sizetext).css('color',textcol).css('background-image','url('+photo+')');
});
});
</script>
</head>
<body>
<table>
<tr><td>Couleur arriere-plan </td><td><input type="text" id="bgcol" class="color"/></td></tr>
<tr><td>Transfère le fichier </td><td> <input type="file" id="photo" /></td></tr>
<tr><td>Taille texte </td><td><input type="text" id="sizetext"/></td></tr>
<tr><td>Couleur texte </td><td><input type="text" id="textcol" class="color"/></td></tr>
<tr><td><input type="button" value="Appliquer" id="save"/></td><td></td></tr>
</table>
Bonjour tout le monde,
C'est un teste pour changer le style de a page. On essaye de donner un moyen aux utilisateurs de choisir le design qui leurs convient.
</body>
</html> |