0
点赞
收藏
分享

微信扫一扫

【汇智学堂】-JS菜鸟版过河小游戏(之三---父母左侧下船)


下船代码:

else if(div1.style.marginLeft=="210px"){	  
	  div1.style.marginLeft=0;
	  shipposition1=0;
	  
	  if(div11=="div1"){
	  	div1.style.marginTop=0;
	  }
	  
	 else if(div11=="div2"){	 	
	  	div1.style.marginTop="100px";
	  } 
	}
	
	else if(div1.style.marginLeft=="110px"){	  
	  div1.style.marginLeft=0;
	  shipposition2=0;
	  
	  if(div11=="div1"){
	  	div1.style.marginTop=0;
	  }
	  
	 else if(div11=="div2"){	 	
	  	div1.style.marginTop="100px";
	  } 
	}


举报

相关推荐

0 条评论