Showing the mysql query results without pressing the button
Example : We write the ID of data and will automatic showing the Name who have the ID without pressing button.
Steps to make is:
1. Create your index.html file and the code is:
<html><head><script type="text/javascript" src="sadam.js"></script></head><body> <form id="form1" name="form1" method="post" action=""> <label>ID <input type="text" name="nimnya" id="nimnya" onkeyup="carinama()" onkeydown="carinama()" /> </label> <p> <label>NAME : <span id="namanya">Input Nim to get name</span> </label> </p> </form> </body></html>
2. Create a javascript file with sadam.js name (in this case I use sadam.js: D) and fill it with this code: