JS 改变图片地址,并通过图片ur地址 获取图片大小,支持IE7
[ 2008-08-31 09:32:14 | 作者: admin ]
HTML code
JScript code
阅读全文…
<div id="divTest" style="border:1px solid red;width:300px;height:300px;">
<br>
<span id="spnTest"></span>
<br>
</div>
<br>
<span id="spnTest"></span>
<br>
</div>
JScript code
<script type="text/javascript" >
var img = document.createElement("img");
img.src = "http://www.csdn.net/Images/logo_csdn.gif";
document.getElementById("divTest").appendChild(img);
o = document.getElementById("spnTest");
img.onload = function()
...var img = document.createElement("img");
img.src = "http://www.csdn.net/Images/logo_csdn.gif";
document.getElementById("divTest").appendChild(img);
o = document.getElementById("spnTest");
img.onload = function()
阅读全文…
1