dom.style.width=Math.random()*500+'px'
不明白你的意思
不明白你的意思
解决方案 »
- jquery 支持安卓等手机web开发bu ?
- 学习效率高的方法 给点参考意见吧
- 请教一个倒计时问题?
- js 右下角弹出div 就像csdn首页右下角那个怎么做啊 有代码吗?
- 简单时间问题
- 如何给创建的元素增加一个属性?
- 那位帮面看看js那里错了,老说缺小对象
- 通过浏览器,想在本地写个文件,文件的内容要从服务器取,能行么?
- javascript的执行顺序
- js 读取xml ,无法获取未定义或 null 引用的属性“documentElement”
- 我在主框架中用了背景图,如何做能让插入的子框架透明,即原主背景图不被覆盖,仍然可见?
- 我想做一个载入数据的进度条,但总是先把数据都读出来之后,才显示进度条
<!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>