<! DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 transitional//en" "Http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd ">
<html xmlns= "http://www.jzread.com/1999/xhtml" >
<head>
<meta http-equiv= "Content-type content=" HTML; charset=gb2312 "/>
<title> Online Run, copy, save as JS code </title>
<style type= "Text/css" >
body,td,th {font-size:12px;}
</style>
</head>
<body>
<script language= "JavaScript" >
var useragent = Navigator.userAgent.toLowerCase ();
var is_opera = useragent.indexof (' opera ')!=-1 && opera.version ();
var is_saf = useragent.indexof (' AppleWebKit ')!=-1 | | Navigator.vendor = = ' Apple Computer, Inc. ';
var IS_WEBTV = useragent.indexof (' WebTV ')!=-1;
var Is_ie = (useragent.indexof (' MSIE ')!=-1 &&!is_opera &&!is_saf &&!IS_WEBTV) && Useragent.substr (Useragent.indexof (' msie ') + 5, 3);
//Run code
function RunCode (obj)
{
var winname = window.open ("," _blank ",");
winname.document.open (' HTML ', ' replace ');
winname.opener = null; Prevent code from talking about page modification
Winname.document.write (Obj.value);
Winname.document.close ();
}
//Save Code
function Savecode (obj) {
var winname = window.open (', ' _blank ', ' top=10000 ');
winname.document.open (' HTML ', ' replace ');
Winname.document.write (Obj.value);
Winname.document.execCommand (' SaveAs ', ', ', ' htmlcode.html ');
Winname.close ();
}
//Copy Code
function Copycode (obj)
{
if (is_ie && obj.style.display!= ' None ')
{
var rng = Document.body.createTextRange ();
rng.movetoelementtext (obj);
Rng.scrollintoview ();
Rng.select ();
Rng.execcommand ("Copy");
Rng.collapse (FALSE);
}
}
//Random function
function Rndnum (n)
{
var rnd= "";
for (var i=0;i<n;i++)
Rnd+=math.floor (Math.random () AOE);
return rnd;
}
</script>
<textarea name= "code111" id= "code111" cols= "a" rows= "ten" >111111111</textarea>