課程
/前端開發(fā)
/jQuery
/jQuery基礎(chǔ)課程
如何實現(xiàn)先顯示,再隱藏,隱藏之后馬上會顯示,循環(huán)起來~
2016-04-05
源自:jQuery基礎(chǔ)課程 7-2
正在回答
setTimeout(isShow, 1000)這個是時鐘嗎
<!DOCTYPE html>
<html>
? ? <head>
? ? ? ? <title>循環(huán)顯示隱藏</title>
? ? ? ? <script src="http://idcbgp.cn/data/jquery-1.8.2.min.js" type="text/javascript"></script>
? ? </head>
? ? <style type="text/css">
? ? #divtest{
? ? ? ? width: 282px;
? ? ? ? height: 100px;
? ? ? ? background-color: blue;
? ? }
? ? </style>
? ? <body>
? ? ? ? <div id="divtest">
? ? ? ? </div>
? ? ? ??
? ? ? ? <script type="text/javascript">
? ? ? ? ? ? $(function () {
? ? ? ? ? ? ? ? setTimeout(isShow, 1000);
? ? ? ? ? ? ? ? function isShow() {
? ? ? ? ? ? ? ? ? ? if ($("#divtest").is(":hidden")) {
? ? ? ? ? ? ? ? ? ? ? ? $("#divtest").show();
? ? ? ? ? ? ? ? ? ? } else {
? ? ? ? ? ? ? ? ? ? ? ? $("#divtest").hide();
? ? ? ? ? ? ? ? ? ? }
? ? ? ? ? ? ? ? ? ? setTimeout(isShow, 1000);
? ? ? ? ? ? ? ? }
? ? ? ? ? ? });
? ? ? ? </script>
? ? </body>
</html>
小尼采 提問者
舉報
加入課程學(xué)習(xí),有效提高前端開發(fā)速度
Copyright ? 2025 imooc.com All Rights Reserved | 京ICP備12003892號-11 京公網(wǎng)安備11010802030151號
購課補(bǔ)貼聯(lián)系客服咨詢優(yōu)惠詳情
慕課網(wǎng)APP您的移動學(xué)習(xí)伙伴
掃描二維碼關(guān)注慕課網(wǎng)微信公眾號
2016-05-14
setTimeout(isShow, 1000)這個是時鐘嗎
2016-04-05
<!DOCTYPE html>
<html>
? ? <head>
? ? ? ? <title>循環(huán)顯示隱藏</title>
? ? ? ? <script src="http://idcbgp.cn/data/jquery-1.8.2.min.js" type="text/javascript"></script>
? ? </head>
? ? <style type="text/css">
? ? #divtest{
? ? ? ? width: 282px;
? ? ? ? height: 100px;
? ? ? ? background-color: blue;
? ? }
? ? </style>
? ? <body>
? ? ? ? <div id="divtest">
? ? ? ? </div>
? ? ? ??
? ? ? ? <script type="text/javascript">
? ? ? ? ? ? $(function () {
? ? ? ? ? ? ? ? setTimeout(isShow, 1000);
? ? ? ? ? ? ? ? function isShow() {
? ? ? ? ? ? ? ? ? ? if ($("#divtest").is(":hidden")) {
? ? ? ? ? ? ? ? ? ? ? ? $("#divtest").show();
? ? ? ? ? ? ? ? ? ? } else {
? ? ? ? ? ? ? ? ? ? ? ? $("#divtest").hide();
? ? ? ? ? ? ? ? ? ? }
? ? ? ? ? ? ? ? ? ? setTimeout(isShow, 1000);
? ? ? ? ? ? ? ? }
? ? ? ? ? ? });
? ? ? ? </script>
? ? </body>
</html>