This option will reset the home page of this site. Restoring any closed widgets or categories.

Reset

View webpage source using javascript

If  you wanna see your webpage source using javascript here is  a simple example just copy and paste the script below to your webpage and press the View Source button.

<form action="#" onsubmit="return getsource();">
<input type="submit" value="View Source!" />
</form>
<script type="text/javascript" >
function getsource()
{
 var thesource= "view-source:" + window.location;
 window.open(thesource, 'source_code', 'width=400, height=400, resizable=1, scrollbars=1');
 return false;
}</script>

This script will work on Mozilla and Chrome. IE hate this script :P 
VN:F [1.5.7_846]
Rating: 7.0/10 (1 vote cast)
VN:F [1.5.7_846]
Rating: 0 (from 0 votes)

Related posts:

  1. Displaying Text from User On Your Webpage
  2. Add to favorites or bookmarking using javascript in firefox and internet explore [IE]
  3. Change webpage background color using javascript
  4. Password protect pages using javascript
  5. Javascript Popup Chromeless Window
  6. PHP is not executed and source visible
  7. Words Validation with Javascript

Leave a Reply

Comments (required)

Spam Protected