<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><title>无标题文档</title><script type="text/javascript" src="http://libs.baidu.com/jquery/1.9.1/jquery.js"></script><script type="text/javascript" >$(function(){var $zuoyi=0;var $youyi=0; $("#zuoyi").bind("click",function(){ $("#s1").animate({left:"-=100px"},3000,function(){$("span").html("左移")}) }); $("youyi").bind("click",function(){ $("s1").animate({left:"+=100px"},3000,function(){$("span").html("右移")}) }); )}</script><style type="text/css">.s1{width:100px;height:100px;border-color:#0000FF;background: #FF0000;}</style></head><body><div> <div class="s1"></div> <input type="button" value="左移动" id="zuoyi"/> <input type="button" value="右移动" id="youyi" /> <span></span></div></body></html>
- 3 回答
- 0 关注
- 1455 浏览
相关问题推荐
添加回答
举报
0/150
提交
取消