python : HTML+CSS (定時器輪尋)

來源:互聯網
上載者:User

標籤:substring   技術   ica   設定   ima   4.0   function   rac   hid   

定時器輪尋

<!DOCTYPE html><html lang="en"><head>    <meta charset="UTF-8">    <title>Title</title></head><body><div id="a"> 北京歡迎您,為你開天闢地</div><script>    function func() {//z 根據Id擷取標籤的內容        var tag = document.getElementById(‘a‘);        var content = tag.innerText;        //獲得標籤內部的內容        var f = content.charAt(0);        var l = content.substring(1, content.length);        var new_content = l+f;        tag.innerText = new_content;    }    //設定定時器    setInterval(‘func()‘, 500);</script></body></html>
定時器輪尋

彈出框

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"        "http://www.w3.org/TR/html4/loose.dtd"><html><head>     <meta charset="UTF-8">    <!--定義一下我是什麼語言-->    <title>Title</title></head><body><input  type="text"/><input id="user" type="button" value="點我" onclick="dianji()"/><script >    function dianji() {      var i=document.getElementById(‘user‘)        alert(i.value)    }</script></body></html>
彈出框

跑馬燈

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"        "http://www.w3.org/TR/html4/loose.dtd"><html><head>    <title>Title</title></head><body><h1 id =‘res‘>有沒有那麼一首歌,會讓我突然想起你</h1><script>    function f1() {        var i=document.getElementById(‘res‘);        var content=i.innerText;        var f=content.charAt(0);        var d=content.substring(1,content.length);       var  new_content=d+f;        i.innerText=new_content;    }    setInterval(‘f1()‘,500)</script></body></html>
跑馬燈

 

python : HTML+CSS (定時器輪尋)

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.