JavaScript總結(1)

來源:互聯網
上載者:User

標籤:hid   視窗   ide   get   write   sage   lock   oct   關閉   

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN""http://www.w3.org/TR/html4/strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml" lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title></title></head><body><script>document.write("I Like You!");//輸入內容:document.write();//alert訊息對話方塊。function rec(){var mychar="I Like You!";alert(mychar);}//確認、取消: confirm訊息對話方塊。var message=confirm("Do You Like it?");if(message==true){document.write("GOOD!");}else{document.write("記得學習哦!");}//提問判斷:prompt訊息對話方塊。var myname=prompt("請輸入您的姓名:");if(myname!=null){alert("您好:"+myname);}else{alert("您好無名氏。")}//開啟新視窗:window.open。window.open([URL], [視窗名稱], [參數字串]);//關閉視窗:window.close。<視窗對象>.close();//innerHTML 屬性用於擷取或替換 HTML 元素的內容。        //顯示和隱藏:display屬性        function hidetext(){  var mychar = document.getElementById("con");mychar.style.display="none";}  function showtext(){  var mychar = document.getElementById("con");mychar.style.display="block";}</script></body></html>

  

JavaScript總結(1)

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在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.