Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
- "http://www.w3.org/TR/html4/loose.dtd">
- <HTML>
- <HEAD>
- <TITLE>
- Definition by Google
- </TITLE>
- <SCRIPT LANGUAGE="JavaScript">
- function defineTerm(form)
- {
- var searchTerm = form.inputbox.value;
- if(isWhitespaceOrEmpty(searchTerm) == false)
- {
- var defineURL = "http://www.google.com/search?q=define:" + searchTerm;
- window.open(defineURL,'_blank');
- }
- else
- {
- alert("You have to enter a valid search term.");
- }
- }
- function isWhitespaceOrEmpty(text){ return !/[^\s]/.test(text); }
- </SCRIPT>
- </HEAD>
- <BODY>
- <FORM NAME="googleDefine" ACTION="" METHOD="POST">
- <FIELDSET STYLE="width: 400px; text-align: center" ALIGN="center">
- <LEGEND> Phr0z3n.Dev's Google Define </LEGEND>
- <INPUT TYPE="text" NAME="inputbox" VALUE="" SIZE="50">
- <INPUT TYPE="button" NAME="button" Value="Define" onClick="defineTerm(this.form)">
- </FIELDSET>
- </FORM>
- </BODY>
- </HTML>
Add Comment
Please, Sign In to add comment