The Code-Bin
Links
Home
Add your code!
All Listings
About
Latest Entry
Featured Scripts
Author's Website
Latest Entries
FFMPEG Thumbnail Scr...
PHP, 0.8KB
Jul. 29, 10:24pm
John
Z80 Assembler, 190 bytes
Feb. 17, 3:36am
John
Z80 Assembler, 176 bytes
Sep. 13, 2:19am
John
Z80 Assembler, 77 bytes
Sep. 13, 2:18am
John
Z80 Assembler, 209 bytes
Sep. 13, 2:17am
untitled Javascript Code
Posted by: dfasf | August 2, 2010 @ 10:47pm
Javascript Code
[
Download
]
<html> <head> <script type="text/javascript"> function showUser(str) { if (str=="") { document.getElementById('chat').innerHTML=""; return; } if (window.XMLHttpRequest) {// code for IE7+, Firefox, Chrome, Opera, Safari xmlhttp=new XMLHttpRequest(); } else {// code for IE6, IE5 xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); } xmlhttp.onreadystatechange=function() { if (xmlhttp.readyState==4 && xmlhttp.status==200) { document.getElementById('chat').innerHTML=xmlhttp.responseText; } } xmlhttp.open("GET","chat.php?q="+str,true); xmlhttp.send(); } </script> </head> <body> <form name="form"> <input type="text" id="text" name="text"> <input type='submit' onclick="showUser("LOL")"> </form> <div id="chat">aaaaaaa</div> </body> </html>
Syntax Highlighting
[
Open in new window
]
Author Comments
none
Rating
4.39 / 8
31 Votes
http://codebin.yi.org/770
page generated in 0.01 seconds