Here is code it may helpful to you
var count = 0;
function changeText(){
count++;
var id = "p1";
if(count == 1)
id = "p2";
else if(count == 2)
id = "p3";
else
count = 0;
document.getElementById(id).style.display = "";
}
<p id="p1">Welcome to the site</p>
<p id="p2" style="display:none;">Welcome to the site2</p>
<p id="p3" style="display:none;">Welcome to the site3</p>
<input type='button' onclick='changeText()' value='Change Text'/>