小图看大图 感觉不用写script吧直接<a href="大图" targer=_new><img src="小图" border="0"></a>写脚本的话也就是加个onclick 把img.src换成大图位置? 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 你可以把按键改成你要的链接<script language="javascript" type="text/javascript"> function enlarge(id) { var node = document.getElementById(id); var width = node.getAttribute("width"); var height = node.getAttribute("height"); node.setAttribute("width",width+10); node.setAttribute("height",height+10); } function shrink(id) { var node = document.getElementById(id); var width = node.getAttribute("width"); var height = node.getAttribute("height"); node.setAttribute("width",width-10); node.setAttribute("height",height-10); }</script></HEAD><BODY><button onclick="enlarge('image');return true;">放大</button><button onclick="shrink('image');return true;">缩小</button><br/><br/><img id="image" src="./image/image1.gif"></BODY></HTML> vista上申请证书的问题 js套js,自动换行,怎么解决? 用JQUERY如何改变表格的列宽 在JS中怎么判断一个程序是否正在运行 求 object.prototype 用户自定义总的个数 js实现时间选择,最好能支持火狐(utf-8) ActiveXObject( "Microsoft.XMLHTTP ") 蛙蛙请教:如何把一个xml转换成vml图形呀 有一个提交的问题 请问如何调用function里面定义的“子function",暂且这么说,谢谢! 怎么实现想163.com的html静态页面的Session 没分了,想免费问个问题!javascript
<script language="javascript" type="text/javascript">
function enlarge(id)
{
var node = document.getElementById(id);
var width = node.getAttribute("width");
var height = node.getAttribute("height");
node.setAttribute("width",width+10);
node.setAttribute("height",height+10);
} function shrink(id)
{
var node = document.getElementById(id);
var width = node.getAttribute("width");
var height = node.getAttribute("height");
node.setAttribute("width",width-10);
node.setAttribute("height",height-10);
}
</script>
</HEAD><BODY>
<button onclick="enlarge('image');return true;">放大</button><button onclick="shrink('image');return true;">缩小</button><br/><br/>
<img id="image" src="./image/image1.gif">
</BODY>
</HTML>