您的位置:首页 > Web前端 > HTML

HTML的一些基本知识和技巧

2009-03-04 17:24 417 查看
 HTML中table行数取得

document.getElementById('tableID').rows.length




在frame中一个界面通过点击刷新另一个界面

parent.frames[frame_name].location.href=url;


 

在子窗体中点按钮刷新主窗体并关闭

if (window.opener != undefined) {
window.opener.parent.location.replace(URL);
window.self.close();
}


 

用IE重起机器或关机

<script language="javascript">
var application = new ActiveXObject('shell.Application.1');
</script>

<button onlick=Application.shutdownWindows();>关机</button>
<button onlick=Application.Suspend();>挂机</button>


 
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息