Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <script type="text/javascript">
- function test(){
- try {
- oPageRequest=new XMLHttpRequest();
- } catch (e) {
- try {
- oPageRequest=new ActiveXObject("Msxml2.XMLHTTP");
- } catch (e) {
- try {
- oPageRequest=new ActiveXObject("Microsoft.XMLHTTP");
- } catch (e) {
- alert("Je browser ondersteund deze actie niet.");
- return false;
- }
- }
- }
- oPageRequest.open("GET","test.php",true);
- oPageRequest.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
- oPageRequest.onreadystatechange=function() {
- if(oPageRequest.readyState == 4 )
- {
- document.getElementById('testz').innerHTML = oPageRequest.responseText;
- }
- }
- oPageRequest.send(null);
- }
- </script>
- <div id="testz">Test</div>
- <input type="button" onclick="test();" value="NAO" />
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement