<mce:script language=javascript><!-- var a=0; // --></mce:script> <?php function func1() { $t="a=a+1;"; return $t."alert(a)"; } ?> <?php echo "<input type=button value='Sure' οnclick=/"".func1()."/">"; ?>