この部分を入れ替えます。
javascript内のソース
function init(){
testID= document.getElementById('test');
}
function show(){
var nexttext = '新しいテキストです。';
testID.innerHTML = nexttext;
}
bodyタグ
<body onload="init();">
HTML
<p><a href="javascript:void(0);" onclick="show();">テキスト入れ替え</a></p>
<p id="test">この部分を入れ替えます。</p>