天天看点

.net中常用小方法总结

(1)、退出系统:

<a onclick="window.parent.opener=null;window.parent.close()"><img src="../App_Themes/MRSOFTASPNET/Images/quit.png"  border="0" /></a>

(2)、系统时间无刷新显示:

 <script type="text/javascript">

//输出显示日期的容器

 document.write("<span id=lblTime width='50px' height='11px' Font-Size='9pt' style='color:White' ></span>")  

 //每1000毫秒(即1秒) 执行一次本段代码

  setInterval("lblTime.innerText=new Date().toLocaleString()",1000) 

</script>

继续阅读