Utklippstavle
Valgmuligheter
DavidS sendte inn denne html4strict-koden 24.02.2010 kl. 21:32.
<?php header ('Content-type:text/html;charset=UTF-8'); ?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <title>Postal</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <script type="text/javascript" src="http://code.jquery.com/jquery-latest.pack.js"></script> <script type="text/javascript"> $(function() { $.ajaxSetup({ scriptCharset: "utf-8" , contentType: "application/json; charset=utf-8"}); $('#zip').keyup (function () { if ($(this).val().length) { $.ajax({ type: "GET", url: "get_postal.php", contentType: "application/json; charset=utf-8", dataType: "json", data: $('form').serialize(), success: function(data) { } }); } }); }); </script> body { font-family:sans-serif; font-size:0.9em; line-height:2em } label { display:inline-block; width:155px; } input { text-transform:uppercase; } </style> </head> <h1>Informasjon om et postnummer</h1> <form method="post" action=""> </p> </form> <p id="info"> </p> </body>
Emneord (tags): postal, ajax, jquery, postnummer
