第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號安全,請及時綁定郵箱和手機立即綁定

為什么運行不了

<!DOCTYPE html>

<html>

? ? <head>

? ? ? ? <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

? ? ? ?

? ? ? ? <title>jQuery動畫特效</title>

? ? ? ? ?<script src="http://libs.baidu.com/jquery/1.9.0/jquery.js" type="text/javascript"></script>

? ? ?<style>

? ? div{

? ? ? ? background:orange;

? ? ? ? width:100px;

? ? ? ? height:100px;

? ? ? ? position:absolute;

? ? ? ? left:200px;

? ? ? ? top:200px;

? ? ? ? }

? ? </style>

? ? </head>

? ?

? ? <body>

? ?

? ? <input type="button" value="向左移" id="left" />

? ? <input type="button" value="向右移" id="right" />

? ? <div></div>

<script type="text/javascript">

$(function (){

? ? $("#left").bind("click",function(){?

? ? ? ? ?$("div").animate({left:'-=50px';},800)

? ? ? ? ?

? ? ? ? ?})

? ? ? ? ?

? ? $("#right").bind("click",function (){

? ? ? ? $("div").animate({left:'+=50px'},800)

? ? ? ??

? ? ? ??

? ? })

? ??

? ??

})

</script>

? ? </body>

</html>


正在回答

2 回答

?$("#left").bind("click",function(){?

? ? ? ? ?$("div").animate({left:'-=50px';},800)

? })

把left:'-=50px'; 這里面的分號去掉就可以了


0 回復 有任何疑惑可以回復我~
#1

田展帆 提問者

非常感謝!
2016-04-11 回復 有任何疑惑可以回復我~
#2

web龍

不對吧 去不去沒什么關系
2016-04-26 回復 有任何疑惑可以回復我~

<!DOCTYPE html>
<html>
??? <head>
??????? <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
??????? <title>jQuery動畫特效</title>
??????? <script src="http://libs.baidu.com/jquery/1.9.0/jquery.js" type="text/javascript"></script>
??????? <style>
??????????? div{
??????????????? position:relative;
??????????????? margin:5px;
??????????????? width:100px;
??????????????? height:100px;
??????????????? border:2px solid #999;
??????????????? background:#f60;
?????????????? ?
??????????????? }
??????? </style>
??? </head>
??? <body>
??????? <button class="i">按鈕1--左移動</button>
??????? <button class="j">按鈕2--右移動</button>
??????? <div>hello world</div>
??????? <script type="text/javascript">
??????????? $(function)(){
??????????????? $(".i").bind("click",function(){
??????????????????? $("div").animate({
??????????????????????? left:"+=50px" },1000,function(){
??????????????????? $(".j").bind("click",function(){
??????????????????????? $("div").animate({
??????????????????????? right:"-=50" },1000,function()
??????????????????????? {$("div").html(執(zhí)行結束!)})
??????????????????? })})})}
????????????????????? ?
??????? </script>
??? </body>
</html>

我這個哪里有問題。

0 回復 有任何疑惑可以回復我~

舉報

0/150
提交
取消
jQuery基礎課程
  • 參與學習       154724    人
  • 解答問題       7289    個

加入課程學習,有效提高前端開發(fā)速度

進入課程

為什么運行不了

我要回答 關注問題
微信客服

購課補貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網(wǎng)微信公眾號