<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title> new document </title>
<meta name="generator" content="editplus" />
<meta name="author" content="Gao YiXiang" />
<meta name="email" content="[email protected]" />
<meta name="keywords" content="javascript dhtml dom" />
<meta name="description" content="I love web development." />
<style>
#L
{
position:absolute;
color:#1c4a74;
background-color:#f3faff;
border:1px #bfd1eb solid;
top:101px;
left:101px;
}
</style>
</head>
<body><div id="L">123</div><script>
var obj = document.getElementById("L");
var _left = obj.currentStyle.left;
var _top = obj.currentStyle.top; alert(_left + " - " + _top)
</script> </body>
</html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title> new document </title>
<meta name="generator" content="editplus" />
<meta name="author" content="Gao YiXiang" />
<meta name="email" content="[email protected]" />
<meta name="keywords" content="javascript dhtml dom" />
<meta name="description" content="I love web development." />
<style>
#L
{
position:absolute;
color:#1c4a74;
background-color:#f3faff;
border:1px #bfd1eb solid;
top:101px;
left:101px;
}
</style>
</head>
<body><div id="L">123</div><script>
var obj = document.getElementById("L");
var _left = obj.currentStyle.left;
var _top = obj.currentStyle.top; alert(_left + " - " + _top)
</script> </body>
</html>
解决方案 »
- jQuery的$(function(){});中的方法无效
- radio按纽为什么要选中二下以后才有反应?在线等
- 在线等
- 如何用js判断某个字符串是否只含有特定字符串?
- js 鼠标事件问题!
- 两上小问题,一个是关于“复制、粘贴”,一个是关于“加入到收藏夹”的,请指教了,立即解贴。
- 请问富文本编辑器UEditor怎么解析出来数据库中保存的值呢?
- 小问题,一分钟就可以帮我解决,不过我很急!
- 100分求一个特效,以前在一个网站看到过的,可惜现在找不到了。是关于表单的特效
- 有错误怎么继续执行下去?
- 写了个表格排序类,放上来抛砖引玉
- 在IE下内存长很多 firefox不会 急================================================================================================
http://download.csdn.net/source/308913样式表中文手册
http://download.csdn.net/source/304124JScript语言参考
http://download.csdn.net/source/308916