劉任昌for迴圈,自訂函數,使用alert內建函數
w3schools截圖
學習心得與內容
嚴格說,HTML/CSS僅是標記語言,不是程式語言,因為不能執行迴圈LOOP、判斷、輸入參數等功能。劉任昌JavaScript For Loop迴圈
教學影片
以上原始程式碼
<style>h1{border:solid red 10px; background-color: purple; color: white;padding:10px; text-align: center; border-radius:20px}
P{FONT-SIZE:30PT;background-image: linear-gradient(to right, red,orange,yellow,green,blue,indigo,violet);line-height:1.2; color: white;}</style>
<script>
function pig(){
t = ""; /*劉任昌宣告變數等於空字元,雙迴圈*/
for (var i = 1 ; i < 9; i ++){
for (var j = 0; j <= i; j=j+2)
t += j;
t += "<br>";}
document.getElementById("cat").innerHTML = t;}
function hog(){
text = "";
for (let i = 128512; i < 128560; i++) {
text += "&#"+i + ";"}
document.getElementById("demo").innerHTML = text;}
</script>
<h1>w3schools截圖</h1>
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiJ-S5dbBpGV1McFWodnqzCVfmlKQZqxZmXmS56emKrN0p3_3QVzY2cK6WOQqj0ysmzF7HSQdLh7L8fn_U7IkLthCRh9PLDS3wNKyz8RgwFIHR5eDfePYWJmX7FaWzncl6fHgI8Kb37GM06Sd38446fvb8bCdaGGzBlfVo9nRHzvwU8oKWJ64aes0vAR2E/s1600/%E6%93%B7%E5%8F%96.PNG" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="665" data-original-width="1635" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiJ-S5dbBpGV1McFWodnqzCVfmlKQZqxZmXmS56emKrN0p3_3QVzY2cK6WOQqj0ysmzF7HSQdLh7L8fn_U7IkLthCRh9PLDS3wNKyz8RgwFIHR5eDfePYWJmX7FaWzncl6fHgI8Kb37GM06Sd38446fvb8bCdaGGzBlfVo9nRHzvwU8oKWJ64aes0vAR2E/s1600/%E6%93%B7%E5%8F%96.PNG" /></a></div>
<h1>學習心得與內容</h1>
嚴格說,HTML/CSS僅是標記語言,不是程式語言,因為不能執行迴圈LOOP、判斷、輸入參數等功能。
<button onclick="pig()">執行我的函數</button>
<p id="cat"></p>
<h2>劉任昌JavaScript For Loop迴圈</h2>
<button onclick="alert('靠杯!')">執行內建函數</button>
<button onclick="hog()">執行自訂函數</button>
<p id="demo"></p>
<h1>教學影片</h1>
<iframe width="560" height="315" src="https://www.youtube.com/embed/9_JdWftT4g8?si=l4u3L5Ovcy-S5fU7" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen></iframe>
作者已經移除這則留言。
回覆刪除https://kitty030994.blogspot.com/2023/10/foralert_1.html
回覆刪除作者已經移除這則留言。
回覆刪除https://wilson11122.blogspot.com/2023/10/pfont-size30ptbackground-image-linear.html
回覆刪除https://whitexd.blogspot.com/2023/10/foralert.html
回覆刪除https://rrrrr-eeeee.blogspot.com/2023/10/pfont-size30ptbackground-image-linear.html
回覆刪除作者已經移除這則留言。
回覆刪除https://www.blogger.com/blog/post/edit/preview/7698579018900065546/1199250762172945097
回覆刪除作者已經移除這則留言。
回覆刪除https://president-kp.blogspot.com/2023/10/foralert.html
回覆刪除https://cindy650092.blogspot.com/2023/10/foralert.html
回覆刪除https://grace8166.blogspot.com/2023/10/foralert.html
回覆刪除https://www.blogger.com/blog/post/edit/preview/3090141429803304882/6600071783804582430
回覆刪除https://amyxl6316.blogspot.com/2023/10/foralert.html
回覆刪除https://keiime.blogspot.com/2023/10/pfont-size30ptbackground-image-linear.html
回覆刪除https://yun0205.blogspot.com/2023/10/pfont-size30ptbackground-image-linear.html
回覆刪除https://lawrence655064.blogspot.com/2023/10/pfont-size30ptbackground-image-linear_1.html
回覆刪除https://hui026.blogspot.com/2023/10/foralert.html
回覆刪除https://asd0908449304.blogspot.com/2023/10/foralert.html
回覆刪除https://oscarliu1688.blogspot.com/2023/10/pfont-size30ptbackground-image-linear.html
回覆刪除https://rainhtmlcssjavascriptjavapython.blogspot.com/2023/10/for.html
回覆刪除https://ctz642895.blogspot.com/2023/10/blog-post.html
回覆刪除https://tustning.blogspot.com/2023/10/p-font-size30pt-background-image-linear.html
回覆刪除https://kk0725.blogspot.com/2023/10/foralert.html
回覆刪除https://htmlcssjavascriptjavapython.blogspot.com/2023/10/foralert.html
回覆刪除https://xi715.blogspot.com/p/blog-page_2.html
回覆刪除https://jduwy67fhkfcf4135.blogspot.com/p/h1bordersolid-red-10px-background-color.html
回覆刪除https://draft.blogger.com/blog/post/edit/2193891179544580221/2643665160806655670
回覆刪除作者已經移除這則留言。
回覆刪除https://the-dumbest-one.blogspot.com/2023/10/alert.html
回覆刪除