你的位置:首页 > 软件开发 > Java > 缩小DIV

缩小DIV

发布时间:2015-11-01 17:00:05
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&qu ...
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html 缩小div</title><script type="text/javascript" src='/images/loading.gif' data-original="jquery-1.2.6.min.js"></script><script language="javascript">  $(function(){    $("div").prop("title",function(index,value){    return "现在的title是new,以前的是:"+value;              });        //缩小事件      $("#bt1").click(function(){        $("div").css("width",function(index,value){        var a=value.substring(0,value.length-2);        return (parseInt(a)-50)+"px";            });                });        });</script><style type="text/css">div {  background-color: #0FF;  height: 200px;  width: 800px;}</style></head><body><div title="old"></div><input id="bt1" type="button" value="缩小"/></body></html>

原标题:缩小DIV

关键词:div

div
*特别声明:以上内容来自于网络收集,著作权属原作者所有,如有侵权,请联系我们: admin#shaoqun.com (#换成@)。