Q:

How to insert new HTML code into existing page?

imagine you have simple page like this:
Hi everybody.
when you 
click here
new text will be inserted.
after click :
Hi everybody.
when you 
"ulala ... I am inserted text"
new text will be inserted.

is it possible to insert this text using PHP or Javascript?
If only javascript is appropriate may you provide a sample code?

thanx a lot

A:

Your HTML:
<p>Hi everybody. when you <span id="mytext"><a href="javascript:EditText()">click here</a></span> new text will be inserted.</p>

Your Javascript:
<script type="text/javascript">
  function EditText() {
      document.getElementById('mytext').innerHTML = 'ulala... I am inserted text';
  }
</script>

