dom.style.width=Math.random()*500+'px'
不明白你的意思
不明白你的意思
解决方案 »
- 求助:根据屏幕宽度改变div的宽度js怎么写?
- jquery.form.js插件上传图片的问题
- 如何把鼠标移动到div附近的文字,就显示该div
- showModelessDialog的对话框如何设置成和父页面一样的大小!
- iframe操作/控制frame?
- 高分求Shell.Application的解决方案(在线等)
- 关于js打印表单值问题?...急啊....路过的帮帮忙啊...
- 将 tree 类型的json数据转化为table
- 怎样屏蔽掉网页的另存为功能(答出立即给分)
- 请问document.location.reload()是什么意思
- 我在主框架中用了背景图,如何做能让插入的子框架透明,即原主背景图不被覆盖,仍然可见?
- 我想做一个载入数据的进度条,但总是先把数据都读出来之后,才显示进度条
<!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>
<style type="text/css">
.w {
background-color: #ff3300;
}
</style>
</head><body>
<script type="text/javascript" src="http://code.jquery.com/jquery-latest.js"></script>
<div class="w"></div>
<br />
<div class="w"></div>
<br />
<div class="w"></div>
<script type="text/javascript">
$(".w").each(function(){
$(this).width(Math.floor(Math.random()*300)+20);
$(this).height(Math.floor(Math.random()*300)+20);
})
</script>
</body>
</html>