æ±æºç
追çInsert title here$(function(){ $("input:eq(0)").click(function(){ $(".b").css({"background-color":"blue"}); }); $("input:eq(1)").click(function(){ $(".b1").css({"background-color":"yellow"}); }); }).a{width: 200px;height: 200px;background-color: red; border-radius:50%;float: left; }.b{width: 100px;height: 100px;background-color: yellow; border-radius:50%;margin:auto;margin-top: 40px}.b1{width: 100px;height: 100px;background-color: blue; border-radius:50%;margin:auto;margin-top: 40px}
追é®è°¢è°¢ï¼ä½æçæææ¯ç¸äºåæ¢
ææé®ç¸äºåæ¢
ï¼
追é®é¡µé¢å°±æ¯ä¸ä¸ªå¤§å两æé®ï¼æä¿©æé®åæ¢ä¸é´çå°åé¢è²
追çå ä¸ä¸ªifå¤æå°±è¡äº
Insert title here$(function(){ $("input:eq(0)").click(function(){ if($(".b").css("background-color")=="blue"){ $(".b").css({"background-color":"yellow"}); }else{ $(".b").css({"background-color":"blue"}); } }); $("input:eq(1)").click(function(){ if($(".b1").css("background-color")=="blue"){ $(".b1").css({"background-color":"yellow"}); }else{ $(".b1").css({"background-color":"blue"}); } });}).a{width: 200px;height: 200px;background-color: red; border-radius:50%;float: left; }.b{width: 100px;height: 100px;background-color: yellow; border-radius:50%;margin:auto;margin-top: 40px}.b1{width: 100px;height: 100px;background-color: blue; border-radius:50%;margin:auto;margin-top: 40px}
第äºä¸ªifå¤æéè¦æ¹æâyellowâä¸ç¶éè¦ç¹å»ä¸¤ä¸æåé¢è²ï¼ä»£ç åæ¥äºï¼ä¸å¥½ææ
æ¹æ¡ä»¶åæ¶åæ¯éçèµå¼ä¹è¦é¢ åä¸ä¸