对网页局部放大缩小js代码
以下为引用的内容: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> } $(function (){reposition(); $("#div_animate").animate({ height: 'toggle', opacity: 'toggle' }, "slow"); $("#div_animate").animate({ height: 'show', opacity: 'show' }, "slow"); }); var zoom=10; function maxZoom(){ zoom+=5; $("#zoomdiv").css("zoom",zoom/10); } function minZoom(){ if(zoom<=0){ zoom=5; }else{ zoom-=5; } $("#zoomdiv").css("zoom",zoom/10); } var inobj=null; function inputTime(){ } </script> <style type="text/css"> body{ margin:0 0 0 0;} button{padding-top:3px;} input {padding-top:3px;} #ddiv{overflow:auto;float:left;width:800px;height:300px;} </style> </head> <body> <button onclick="addNewrow();">增加</button><button onclick="maxZoom();">放大</button><button onclick="minZoom();">缩小</button> <div id="ddiv"> <div id="zoomdiv"> <table id="tt"> <tbody> </tbody> </table> <input type="button" value="按钮"> </div> </div> <div id="timeseler"> <select id="hour"> <script>for(var i=0;i<24;i++){ document.write("<option>"+(i<10?("0"+i):i)+"</option>"); }</script> </select> <select id="minis"> <script>for(var i=0;i<60;i++){ document.write("<option>"+(i<10?("0"+i):i)+"</option>"); }</script> </select> <input type="button" onclick="inputTime();" value="确认"> </div> <div id="div_animate" style="width:100px;height:100px;background-color:red;"> </div> </body> </html> |