Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <html>
- <head>
- <script src="JsHttpRequest.js"></script>
- <script type="text/javascript" language="JavaScript">
- function doLoad(value) {
- // Create new JsHttpRequest object.
- var req = new JsHttpRequest();
- // Prepare request object (automatically choose GET or POST).
- req.open('GET', '/cgi-bin/parser.pl', true);
- // Send data to backend.
- req.send( { q: value } );
- }
- </script>
- </head>
- <body onload="doLoad(this.value)">
- <form>
- EX.UA: <input type="text" name="text">
- <input type="button" value="Search"
- onclick="doLoad(this.form.text.value)">
- </form>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement