关于div的问题 如果在div中放一个图片,如何设置图片大小随着div的大小变化而变化 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 不知道是不是这样的效果顺便在冒昧的说2句2分帖 不是很感兴趣的帖子 貌似别人就算会写也未必帮你写 就算别人不在乎分<script>function zoom(id){ var obj= this this.element = document.getElementById(id) document.getElementById(id).onmousedown =function(e) { e = e || event var oo = obj.element oo.width = oo.offsetWidth oo.height = oo.offsetHeight oo.cx = e.clientX oo.cy = e.clientY document.onmousemove=function(e) { e = e || event var oo = obj.elementdocument.getElementById("gg").setCapture();oo.style.width = (oo.width + e.clientX - oo.cx)>0?(oo.width + e.clientX - oo.cx):0; oo.style.height = (oo.height + e.clientY - oo.cy)>0?(oo.height + e.clientY - oo.cy):0;document.getElementById("s").style.width=document.getElementById("gg").offsetWidth-10document.getElementById("s").style.height=document.getElementById("gg").offsetHeight-10 } document.onmouseup=function() { document.getElementById("gg").releaseCapture(); document.onmousedown = null document.onmousemove = null } }}window.onload = function(){new zoom("gg")}</script><body><div id="gg" style="width:150px; height:150px; background:#99FF00; cursor:nw-resize; border:1px solid #000000"><img id="s" src="http://img1.qq.com/news/pics/14176/14176497.jpg" style="width:140px; height:140px;"></div></body> json提交问题 js调用web service报错access is denied 关于 JQ中$.getJSON 的超时BUG 提问! 华尔兹搜索 用cmd进入32的DOS里对RAR文件的解压 谢谢大哥、大姐高手指点 JS取对象的问题..求解 鼠标移动到图片的某一个热点,显示一个popup窗口,怎么做 关于动态生成iframe和form,form提交到iframe的问题。 在线等待******怎样用javascript在网页中插入Powerpoint?********* 一个难问题? showModalDialog如何在执行完一段代码后自动关闭? 清空上传文件框后,不能提交表单了
顺便在冒昧的说2句
2分帖 不是很感兴趣的帖子 貌似别人就算会写也未必帮你写 就算别人不在乎分
<script>function zoom(id){
var obj= this
this.element = document.getElementById(id)
document.getElementById(id).onmousedown =function(e)
{
e = e || event
var oo = obj.element
oo.width = oo.offsetWidth
oo.height = oo.offsetHeight
oo.cx = e.clientX
oo.cy = e.clientY
document.onmousemove=function(e)
{
e = e || event
var oo = obj.element
document.getElementById("gg").setCapture();
oo.style.width = (oo.width + e.clientX - oo.cx)>0?(oo.width + e.clientX - oo.cx):0;
oo.style.height = (oo.height + e.clientY - oo.cy)>0?(oo.height + e.clientY - oo.cy):0;
document.getElementById("s").style.width=document.getElementById("gg").offsetWidth-10
document.getElementById("s").style.height=document.getElementById("gg").offsetHeight-10
}
document.onmouseup=function()
{
document.getElementById("gg").releaseCapture();
document.onmousedown = null
document.onmousemove = null
}
}
}
window.onload = function(){
new zoom("gg")
}
</script>
<body><div id="gg" style="width:150px; height:150px; background:#99FF00; cursor:nw-resize; border:1px solid #000000">
<img id="s" src="http://img1.qq.com/news/pics/14176/14176497.jpg" style="width:140px; height:140px;">
</div></body>