MathCurvesSurfacesWallpaper GroupsGallerySoftwarePOV-Ray
ProgramingLinuxPerl PythonHTMLCSSJavaScriptPHPJavaEmacsUnicode ♥
Web Hosting by 1&1

JavaScript Example: Visit URL in a New Window

Xah Lee,

Type a domain name in the following field then press Enter. Then, the browser will visit that URL in a new window.

Goto site:

The code looks like this:

function f() {
 var ss = document.getElementById("xx").value;
 open( "http://" + ss );
}
<form action="" onSubmit="f(); return false;">
<p>Goto site: <input id="xx" type="text" size="40" value="xahlee.info"></p>
</form>
blog comments powered by Disqus