function MM_findObj(n, d) { //v4.0 
var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) { 
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);} 
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[n]; 
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers.document); 
if(!x && document.getElementById) x=document.getElementById(n); return x; 
} 

function runEx(){ 
var winEx = window.open("", "winEx", "width=300,height=200,status=yes,menubar=yes,scrollbars=yes,resizable=yes"); winEx.document.open("text/html", "replace"); 
 
winEx.document.open("text/html", "replace") 
winEx.document.write(unescape(event.srcElement.parentElement.children[2].value)); 
winEx.document.close(); 
} 


function test(){ 
obj=MM_findObj('message'); 
if (obj.value.length<1) {alert("请输入代码后按运行");obj.focus();} 
else{ 
var winEx = window.open("", "winEx", "width=300,height=200,status=yes,menubar=yes,scrollbars=yes,resizable=yes"); winEx.document.open("text/html", "replace"); 

winEx.document.open("text/html", "replace") 
winEx.document.write(obj.value); 
winEx.document.close(); 
} 
}