Find us on Google+ Kill the code: May 2012

Thursday, 24 May 2012

Surfing on a html page using iframe

Preview :








Code:


<html>
   <head>
      <script type="text/javascript">
         function surf() {
            document.getElementById('web').src=document.getElementById('url').value;
         }
      </script>


   </head>
   <table>
      <tr>
         <td>
            <input type="text" id="url" /><input type="button" id="sruf" value="surf" onclick="return surf()"/>
         </td> 
      </tr>
   </table>

   <iframe height="400px" width="400px" src="http://www.killthecode.blogspot.com" id="web"> </iframe>    



</html>