惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

The GitHub Blog
The GitHub Blog
雷峰网
雷峰网
小众软件
小众软件
博客园 - 【当耐特】
J
Java Code Geeks
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
Hugging Face - Blog
Hugging Face - Blog
腾讯CDC
Engineering at Meta
Engineering at Meta
aimingoo的专栏
aimingoo的专栏
A
About on SuperTechFans
H
Help Net Security
博客园_首页
P
Proofpoint News Feed
GbyAI
GbyAI
大猫的无限游戏
大猫的无限游戏
N
Netflix TechBlog - Medium
爱范儿
爱范儿
MyScale Blog
MyScale Blog
Blog — PlanetScale
Blog — PlanetScale
The Cloudflare Blog
MongoDB | Blog
MongoDB | Blog
酷 壳 – CoolShell
酷 壳 – CoolShell
Google DeepMind News
Google DeepMind News

博客园 - .net小鸟

产品很重要 JQUERY FAQ 无法打开到主机的连接,在端口xxx连接失败 eclipse的调试技术 js parseInt与排序 html到asp.net样式变乱 django学习资料 FAQ js工具类 python31操作MySql jquery iframe 父子互操作 .net连接mysql maven下载地址 jquery操作ul notepad++中用正则表达式 jquery 两个控件同享一个function javascript 经常会用到的东西 javascript closure anonymous function javafirststep
javascript template
.net小鸟 · 2011-06-18 · via 博客园 - .net小鸟

<html>
<head>
//当做模板使用,减少重复性的工作
<script language="javascript">
window.onload
=function(){
    alert($(
"div1").offsetHeight);
    alert($(
"div2").offsetHeight);
}
function $(id)
{
    
return document.getElementById(id);
}
</script>
</head>
<body>
<div id="div1" style = "position:absolute;width:300px;height:300px;margin-top:200px;background-color:red">
<div id="div2" style = "position:absolute;width:100px;height:200px;margin-top:50px;background-color:yellow;border:4px solid green;">
</div>
</div>
</body>
</html>