is anybody there to help me

M

mekalai82

i need to read the html tag from the webpage.
is it possible to view the source code?
from that URL how to get the specific html tag content ?
 
S

SAM

(e-mail address removed) a écrit :
i need to read the html tag from the webpage.
is it possible to view the source code?
from that URL how to get the specific html tag content ?



<script type="text/javascript">
function voir_source(){window.location="view-source:"+window.location}
</script>


<p><button onclick="voir_source()">see source</button></p>


for the html tag :


<script type="text/javascript">
function seeSource() {
var all = document.getElementsByTagName('HTML')[0].innerHTML;
all = all.replace(/</g,'&lt;');
document.getElementById('surce').innerHTML = all;
}
</script>

<p><button onclick="seeSource()">see source</button></p>
<pre id="surce">
</pre>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,143
Messages
2,570,822
Members
47,368
Latest member
michaelsmithh

Latest Threads

Top