Open a Web site in the default browser

From TheAlmightyGuru
Jump to: navigation, search

Open a Web site in the default browser is a JScript program that will open the default Web browser in Windows to the page specified.

Source

// Copyright 2018, Dean Tersigni.
// The Shell.Run normally runs a program, but it will also identify URLs
// starting with a protocol like "http://" or "ftp://".
// If the parameter begins with "www.", a protocol of http:// is inferred.

var oShell = new ActiveXObject("WScript.Shell");
oShell.Run( "http://www.google.com" );