日期:2014-05-16  浏览次数:20348 次

Style与currentStyle
调用css外部样式表

JScript code
var p=document.getElementById('pic');
var left=p.currentStyle.left;
left=parseInt(left.substr(0,left.length-2));
p.style.left=(left+10)+"px";//这里为什么是style才能移动,而改成currentStyle就无法移动?



------解决方案--------------------
currentStyle只用来取值。
------解决方案--------------------
貌似就是只取值,不赋值
------解决方案--------------------
属必有 get set 两种动作
有的只有get 没有set
------解决方案--------------------
http://www.phpx.com/man/dhtmlcn/objects/currentStyle.html