iT邦幫忙

2021 iThome 鐵人賽

DAY 12
0

What is JavaScript?

How do we usually write JavaScript language?

Example

<script type="text/javascript">
    alert("Always call your girlfriend 'young lady' means...");
    alert("You are good at safing your relationship.");
</script>
  • Add a tag <script></script> and an attribute to indicate that the language we’re writing is JavaScript.
  • A command, alert, and its string "Always call your girlfriend 'young lady' means..."
    • The string can be multiple, but don’t forget to add a semicolon in the end of it.

Final Design

https://ithelp.ithome.com.tw/upload/images/20210911/20130362qROzXW1CuN.png
https://ithelp.ithome.com.tw/upload/images/20210911/20130362t9yDhP92SY.png

<!DOCTYPE html>
<html>
<head>
    <title>JavaScript</title>
    <script type="text/javascript">
        alert("Always call your girlfriend 'young lady' means...");
        alert("You are good at safing your relationship.");
    </script>
</head>
</html>

Music of Today: Butterflies by Johnny Stimson

Yes


Like/Share/Follow

Feel free to comment and share your ideas below to learn together!
If you guys find this article helpful, please kindly do the writer a favor — LIKE this article./images/emoticon/emoticon12.gif


上一篇
#11 CSS3 Flexbox: RWD
下一篇
#13 JS: Intro to Data, Variables, Operators
系列文
Learn & Play JavaScript -- Entry-Level Front-End Web Development30
圖片
  直播研討會
圖片
{{ item.channelVendor }} {{ item.webinarstarted }} |
{{ formatDate(item.duration) }}
直播中

尚未有邦友留言

立即登入留言