输出可以Gioven Html格式,但我可以显示Runat服务器 [英] Out Put Can Gioven Html Format But I Can Show Runat Server
问题描述
< script 类型 = text / javascript src = http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js > < / script >
< script 类型 = text / javascript >
$(document).ready(function(){
Sh owTime();
});
函数ShowTime(){
var dt = new Date();
document.getElementById(lblTime)。innerHTML = dt.toLocaleTimeString();
window.setTimeout(ShowTime(),1000); //这里1000(毫秒)表示一个1秒
}
< / script >
输出可以显示
====== =======
< label id =lblTimestyle =font-weight:bold>< / label>
但是可以显示这个级别
==============
< asp:label id =lblTimerunat =Server>
输出无法显示
< blockquote>(document).ready(function(){
ShowTime();
});
函数ShowTime(){
var dt = new Date();
document.getElementById(lblTime)。innerHTML = dt.toLocaleTimeString();
window.setTimeout(ShowTime(),1000); //这里1000(毫秒)表示一个1秒
}
< / script >
输出可以显示
====== =======
< label id =lblTimestyle =font-weight:bold>< / label>
但是可以显示这个级别
==============
< asp:label id =lblTimerunat =Server>
输出无法显示
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
<script type="text/javascript">
$(document).ready(function () {
ShowTime();
});
function ShowTime() {
var dt = new Date();
document.getElementById("lblTime").innerHTML = dt.toLocaleTimeString();
window.setTimeout("ShowTime()", 1000); // Here 1000(milliseconds) means one 1 Sec
}
</script>
Output can show
=============
<label id="lblTime" style=" font-weight:bold"></label>
But can show this level
==============
<asp:label id="lblTime" runat="Server">
Output can not show
(document).ready(function () { ShowTime(); }); function ShowTime() { var dt = new Date(); document.getElementById("lblTime").innerHTML = dt.toLocaleTimeString(); window.setTimeout("ShowTime()", 1000); // Here 1000(milliseconds) means one 1 Sec } </script>
Output can show
=============
<label id="lblTime" style=" font-weight:bold"></label>
But can show this level
==============
<asp:label id="lblTime" runat="Server">
Output can not show
这篇关于输出可以Gioven Html格式,但我可以显示Runat服务器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!