Rachit Shah Posted March 29, 2006 Share Posted March 29, 2006 When I am using document.body.innerHTML, I am getting<input type="button" onclick="writeIt()" value="Write">I dont know where the / has gone.Do anyone know How can I retrieve exact source line.(i.e with / in the tag source) <html><head><script id='script1' name='script1' type="text/javascript">function writeIt () {var x= "<script>" + window.document.scripts(0).text;x = x + "</script";x = x + ">";alert(x);alert(document.body.innerHTML);}</script></head><body><input type="button" onclick="writeIt()" value="Write"/></body></html> Link to comment Share on other sites More sharing options...
miteshbhimjiyaani Posted March 29, 2006 Share Posted March 29, 2006 When I am using document.body.innerHTML, I am getting<input type="button" onclick="writeIt()" value="Write">I dont know where the / has gone.Do anyone know How can I retrieve exact source line.(i.e with / in the tag source)<{POST_SNAPBACK}> hibz / is not interputted by html browser. but if u r use \ then it will work. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now