Exercici6 axax jquery
De wikiserver
Programa de client exercici6.html amb JQUERY
<html>
<body>
<h1>exercici 6 AJAX</h1>
<input type="text" id="input"></input>
<br>Suggeriments:
<div id="contingut"></div>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
<script lang="javascript">
$("input").on("input",change);
function change() {
$.get("exercici6.php",{q:input.value},function(data,textStatus, jqXHR){
$("#contingut").html(data);
});
}
</script>
</body>
</html>