<div id="div1">test </div> <script type="text/javascript">
var bj = "url(logo3.jpg) no-repeat";
div = window.document.getElementById("div1");
div.style.background=bj;
document.getElementById("div1").style.width=300px;
document.getElementById("div1").style.height=500px;
</script>body>
var bj = "url(logo3.jpg) no-repeat";
div = window.document.getElementById("div1");
div.style.background=bj;
document.getElementById("div1").style.width=300px;
document.getElementById("div1").style.height=500px;
</script>body>
解决方案 »
- 请问mootools 有 jquery $(this) 的方法么?
- 请问用jquery怎样移动到指定位置
- jQuery获取值与赋值的小问题
- 帮忙看一下这个下拉列表的JS代码怎么改
- js cookies 关于访客来路记录的问题
- 不知道那里错了,<span id="oTime1"></span>和<span id="oTime2"></span>中出不来结果
- 小白级问题,判断动态输入框是否为空
- JAVASCRIPT 父子窗口的问题
- 客户端清除下拉项
- 有没有这样的方法,点击窗口关闭按钮的时候触发的方法,在线等待
- 在Gridview中的Validator简单问题
- 请解释一下jquery中 ajaxComplete这个函数怎么用,网上的信息太少了,谢谢
郁闷了半天谢谢1楼 我刚来没分
呵呵,谢谢了。
不过你少加了单引号,没有单引号也不行!<script type="text/javascript">
var bj = "url(logo3.jpg) no-repeat";
div = window.document.getElementById("div1");
div.style.background=bj;
document.getElementById("div1").style.width='300px';
document.getElementById("div1").style.height='500px';
</script>