Question: Newbie here...easy question for you pro outthere

How to put a button on a htmlpage that says E-mail here, and then the simplemodal contactform pop up (just like in the demo)
Can't get it right with the link... :( 

Regards
/Pia

Answer: 
Give `<p>` an ID and you're on your way:

```
<p id='p1'>content...</p>

```

Javascript:

```
var text = document.getElementById('p1').innerHTML;
text = text.replace("c","x");
...
document.getElementById('p1').innerHTML = text;

```

**EDIT**

To target all `<p>`s, do as you said:

```
var allPs = document.getElementsByTagName("P");
var text;

for(i=0;i<allPs.length;i++) {
  text = allPs[i].innerHTML;
  text = text.replace("c","x");
  allPs[i].innerHTML = text;
}

```

You may have to run a `while` loop over the `.replace()` method, since calling it once will only do a single replacement (i.e. only 1 "c" will be replaced).
Use regular expressions and chain multiple replace's together: 

```
window.onload = function() {
    var string = document.getElementsByTagName("p")[0].innerHTML;
    var replacedString = string.replace(/somespecialchar/gi, "replaceWith").replace(/someotherspecialchar/gi, "replaceWith").replace(/anotherchar/gi, "replaceWith");
    document.getElementsByTagName("p")[0].innerHTML = replacedString;
}

```