Highlights
All Snippets
Top 100 Snippets
Librarians
gbCodeLib

By Language
VB6
JavaScript
Perl
HTML
SQL
Java
DOS

GBIC >> Source Code >> JavaScript >> Snippet

View page source


< html >
< head >
< script >
function viewSource() {
document.getSource.view.value = "Please wait!" ;
setTimeout( "document.getSource.view.value='View Source!'" ,6000);
window.location.href = "view-source:" + document.getSource.url.value;
return false ;
}
</ script >
</ head >
< body >
Type in a full URL and click "View Source"
< p >
< form name = getSource onSubmit = "return viewSource();" >
< input type = text name = url value = "http://" >
< p >
< input type = submit name = view value = "View Source" >
</ form >
</ center >
</ BODY >
</ html >