如题,用
document.getElementById("image1").width=100;
document.getElementById("image1").height=100;
好像都不行,
郁闷啊!
document.getElementById("image1").width=100;
document.getElementById("image1").height=100;
好像都不行,
郁闷啊!
解决方案 »
- .net读取配置文件内容
- IIS6 怎么添加应用程序池Classic .NET AppPool?
- 散分,买卖,供求数据库字段命名成什么比较好?
- .net异步还是多线程?
- 使用JMail收取邮件附件怎么会出现这样的怪问题
- 90分求怎么取得html SELECT选项的问题?在线等待,解决立即送分!
- asp/asp.net内部对象说明,session,request,..............等等
- treeview问题
- 大家帮我看一下,应该很简单的一个问题。
- ASP.Net button第一次点击js中的回调函数不执行,第二次点击才执行
- ImageButton 如何设置为重设置
- [求助...]VS2003中,能不能不用File Field控件上传文件?
建议用ajax实现吧
的确是这样写的
我用这个试过了
var flag=false;
function IMG1_onclick()
{
if(flag)
{
document.getElementById("IMG1").width=300;
document.getElementById("IMG1").height=100;
flag=false;
return;
}
document.getElementById("IMG1").width=100;
document.getElementById("IMG1").height=300;
flag=true;
}
$("#img1").css({width:$w,height:$h, marginLeft:(wContainer-$w)*.5,marginTop:(hContainer-$h)*.5})
我用的是jQuery库 快截开发 也很容易记容易理解`~
document.getElementById("image1").style.height="100px";
补充下 ` jQuery兼容性很好`
document.getElementById("image1").style.height="100px";
结贴,给分!