Displayed on the pages in HTML code JAVA CRIPT

  Displayed on the pages in HTML code JAVA SCRIPT 

  <script Defer> 
  Function _show (str) ( 
  ? Var w = window.open ('',''); 
  ? Var d = w.document; 
  ? D.open (); 
  ? Str = str.replace (/=(?!")(.*?)(?!")( | ") / g," = \ "$ 1 \" $ 2 "); 
  ? Str = str.replace (/(<)(.*?)(>)/ g, "<span style='color:red;'> <$ 2> </ span> <br />"); 
  ? Str.replace str = (/ \ r / g, "<br /> \ n"); 
  ? D.write (str); 
  ?) 
  </ Script> 
<html>
<body>
<form>
  <input Type="button" value="SHOW" onClick="_show(document.documentElement.innerHTML)" /> 
  </ Form> 
  </ Body> 
  </ Html> 

  Middle spent the regular expression 

  Posted on 2006-06-01 17:00 ZengChang Reading (68) Comments (0) quoted edit collections for the category: Learning Notes 

Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Digg
  • del.icio.us
  • Facebook
  • DotNetKicks
  • DZone
  • Netvouz
  • Propeller

Tags:

Releated Java Articles

Comments

Leave a Reply