DHTML – Insert and Remove Text

[Total: 0    Average: 0/5]

Insert HTML with a click of a button.

Head Code:

var STATE=1;
var MSG=new Array();
MSG[0]="You clicked";
function fun_nb()
  var my_msg=MSG[STATE];

Body Code:

<span id="test"></span>
<input type=button value="click here" onclick="fun_nb();" >
<input type=button value="alert here" onclick="alert('message here');" >

Times Viewed: 11

Leave a Reply

Your email address will not be published. Required fields are marked *