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
| <html>
<head>
<title>Test smarty</title>
<script type="text/javascript" src="../js/jquery.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$('#add').click($.post("../calcul.php",{ a: $('#a').value, b: $('#b').value },
function(data){
$('#resultat').html(data);
})
);
});
</script>
</head>
<body>
<center>
<br/><br/><br/>
<form>
a : <input type="text" name="a" id="a"/><br/>
b : <input type="text" name="b" id="b"/><br/>
<input type="button" name="submit" value="Addition" id="add"/>
</form>
<p id="resultat"><!--{$resultat}--></p>
</center>
</body>
</html> |