<script>
function printTime(){
var d = new Date();
var h= d.getHours();
var m= d.getMinutes();
var s= d.getSeconds();
document.getElementById("time").innerHTML= h+":"+m+":"+s;
}
function showTimeIn3Seconds(){
setTimeout(printTime,3000);
}
</script>
<div id="time"></div>
<button onclick="showTimeIn3Seconds()">点击后3秒钟后显示当前时间,并且只显示一次</button>
<script>
function printTime(){
var d = new Date();
var h= d.getHours();
var m= d.getMinutes();
var s= d.getSeconds();
document.getElementById("time").innerHTML= h+":"+m+":"+s;
}
function showTimeIn3Seconds(){
setTimeout(printTime,3000);
}
</script>
<div id="time"></div>
<button onclick="showTimeIn3Seconds()">点击后3秒钟后显示当前时间,并且只显示一次</button>
");
window.frames["iframe1169"].document.write(decodeHtml(code1169));
window.frames["iframe1169"].document.close();
//load和下面的非load必需并存,因为如果代码用到了jquery就必须使用load的方式
$(window.frames["iframe1169"]).load(function(){
$("#iframe1169").height($("#iframe1169").contents().find("body").height()+showittryitheight);
});
$("#iframe1169").height($("#iframe1169").contents().find("body").height()+showittryitheight);
alreadyWriteCode1169 = code1169;
$("#rendering1169").hide();
$("#rendered1169").show();
}
var tRereshRetry2DemoPanel1169 = setInterval(rereshRetry2DemoPanel1169,1000);
var binded1169 = false;
$("textarea#stepcodeTextarea1169").keyup(function(){
if(!binded1169){
$(window).bind('beforeunload',function(){
binded1169 = true;
return "xxxx";
});
}
var newCode = $(this).val()
code1169 = newCode;
/*below code is replaced by function rereshRetry2DemoPanel()*/
// if(code1169!=newCode){
// window.frames["iframe1169"].document.write("
<p>每隔1秒钟,打印当前时间</p>
<div id="time"></div>
<script>
function printTime(){
var d = new Date();
var h= d.getHours();
var m= d.getMinutes();
var s= d.getSeconds();
document.getElementById("time").innerHTML= h+":"+m+":"+s;
}
var t = setInterval(printTime,1000);
</script>
<br><br>
<p>每隔1秒钟,打印当前时间</p>
<div id="time"></div>
<script>
function printTime(){
var d = new Date();
var h= d.getHours();
var m= d.getMinutes();
var s= d.getSeconds();
document.getElementById("time").innerHTML= h+":"+m+":"+s;
}
var t = setInterval(printTime,1000);
</script>
<br><br>
");
window.frames["iframe1170"].document.write(decodeHtml(code1170));
window.frames["iframe1170"].document.close();
//load和下面的非load必需并存,因为如果代码用到了jquery就必须使用load的方式
$(window.frames["iframe1170"]).load(function(){
$("#iframe1170").height($("#iframe1170").contents().find("body").height()+showittryitheight);
});
$("#iframe1170").height($("#iframe1170").contents().find("body").height()+showittryitheight);
alreadyWriteCode1170 = code1170;
$("#rendering1170").hide();
$("#rendered1170").show();
}
var tRereshRetry2DemoPanel1170 = setInterval(rereshRetry2DemoPanel1170,1000);
var binded1170 = false;
$("textarea#stepcodeTextarea1170").keyup(function(){
if(!binded1170){
$(window).bind('beforeunload',function(){
binded1170 = true;
return "xxxx";
});
}
var newCode = $(this).val()
code1170 = newCode;
/*below code is replaced by function rereshRetry2DemoPanel()*/
// if(code1170!=newCode){
// window.frames["iframe1170"].document.write("
<p>每隔1秒钟,打印当前时间</p>
<div id="time"></div>
<script>
var t = setInterval(printTime,1000);
function printTime(){
var d = new Date();
var h= d.getHours();
var m= d.getMinutes();
var s= d.getSeconds();
document.getElementById("time").innerHTML= h+":"+m+":"+s;
if(s%5==0)
clearInterval(t);
}
</script>
<br>
<p>每隔1秒钟,打印当前时间</p>
<div id="time"></div>
<script>
var t = setInterval(printTime,1000);
function printTime(){
var d = new Date();
var h= d.getHours();
var m= d.getMinutes();
var s= d.getSeconds();
document.getElementById("time").innerHTML= h+":"+m+":"+s;
if(s%5==0)
clearInterval(t);
}
</script>
<br>
");
window.frames["iframe1171"].document.write(decodeHtml(code1171));
window.frames["iframe1171"].document.close();
//load和下面的非load必需并存,因为如果代码用到了jquery就必须使用load的方式
$(window.frames["iframe1171"]).load(function(){
$("#iframe1171").height($("#iframe1171").contents().find("body").height()+showittryitheight);
});
$("#iframe1171").height($("#iframe1171").contents().find("body").height()+showittryitheight);
alreadyWriteCode1171 = code1171;
$("#rendering1171").hide();
$("#rendered1171").show();
}
var tRereshRetry2DemoPanel1171 = setInterval(rereshRetry2DemoPanel1171,1000);
var binded1171 = false;
$("textarea#stepcodeTextarea1171").keyup(function(){
if(!binded1171){
$(window).bind('beforeunload',function(){
binded1171 = true;
return "xxxx";
});
}
var newCode = $(this).val()
code1171 = newCode;
/*below code is replaced by function rereshRetry2DemoPanel()*/
// if(code1171!=newCode){
// window.frames["iframe1171"].document.write("
<p>每隔1秒钟,通过document.write打印当前时间</p>
<script>
function printTime(){
var d = new Date();
document.write(d.getHours());
document.write(":");
document.write(d.getMinutes());
document.write(":");
document.write(d.getSeconds());
document.close();
}
var t = setInterval(printTime,1000);
</script>
<p>每隔1秒钟,通过document.write打印当前时间</p>
<script>
function printTime(){
var d = new Date();
document.write(d.getHours());
document.write(":");
document.write(d.getMinutes());
document.write(":");
document.write(d.getSeconds());
document.close();
}
var t = setInterval(printTime,1000);
</script>
");
window.frames["iframe1172"].document.write(decodeHtml(code1172));
window.frames["iframe1172"].document.close();
//load和下面的非load必需并存,因为如果代码用到了jquery就必须使用load的方式
$(window.frames["iframe1172"]).load(function(){
$("#iframe1172").height($("#iframe1172").contents().find("body").height()+showittryitheight);
});
$("#iframe1172").height($("#iframe1172").contents().find("body").height()+showittryitheight);
alreadyWriteCode1172 = code1172;
$("#rendering1172").hide();
$("#rendered1172").show();
}
var tRereshRetry2DemoPanel1172 = setInterval(rereshRetry2DemoPanel1172,1000);
var binded1172 = false;
$("textarea#stepcodeTextarea1172").keyup(function(){
if(!binded1172){
$(window).bind('beforeunload',function(){
binded1172 = true;
return "xxxx";
});
}
var newCode = $(this).val()
code1172 = newCode;
/*below code is replaced by function rereshRetry2DemoPanel()*/
// if(code1172!=newCode){
// window.frames["iframe1172"].document.write("