劉任昌Javascript與Python比較
CSS也可以in-line
寫在這裡成為網頁的一部分,執行後,可以看到。function kill_SHOW執行二指令 banks.pop()指令移除banks串列的最後一個元素ABC()去執行函數ABC()。P代表paragraph段落
以上所有程式碼
<STYLE> BUTTON{COLOR:WHITE;BORDER-RADIUS:20PX;BACKGROUND-COLOR:BLACK;}
H1{COLOR:WHITE;BACKGROUND-COLOR:BLACK;TEXT-ALIGN:CENTER;PADDING:5PX;}
P{BACKGROUND-COLOR:GRAY; FONT-SIZE:24PX;COLOR:WHITE;}
</STYLE>
<button onclick="ABC()">全球市場價值最大的銀行</button>
<button onclick="X()">按鈕PUSH增加</button>
<button onclick="kill()">按鈕POP執行自訂函數kill</button>
<button onclick="kill_SHOW()">按鈕POP執行kill呼叫其他函數</button>
<P id="SHOW"></P>
CSS也可以in-line
<script>
banks=['摩根大通','美國銀行','中國工商銀行','富國銀行','匯豐銀行','巴黎銀行'];
function ABC() {//第一個函數function ABC()
let x = '';//定義字串x內容空白
for (let i in banks)//javascript for loop () python不需要
{ x += banks[i] + '<BR>';} //x後面加上banks[0]....<>
document.getElementById('SHOW').innerHTML = x;}
function X(){//第一個函數function X()
banks.push('三菱銀行') //加入push
let x = '';//定義字串x內容空白
let n = banks.length; //n儲存banks串列list的長度length
for (let i=0; i < n; i++)//javascript for loop () python不需要
{ x += banks[i] + '<BR>';} //x後面加上banks[0]....<>
document.getElementById('SHOW').innerHTML = x;
}
function kill(){banks.pop();}
function kill_SHOW(){banks.pop(); ABC();}//函數二指令INSTRUCTION放在一起
</script>
寫在這裡成為網頁的一部分,執行後,可以看到。function kill_SHOW執行二指令
banks.pop()指令移除banks串列的最後一個元素ABC()去執行函數ABC()
PYTHON練習
banks=['摩根大通','美國銀行','匯豐銀行'] for i in banks: abc = '我是' + i + 'VIP客戶' print(abc) print('劉任昌下次要在專門的系統執行python')呂.依照531再練習PYTHON指令https://lu-chieh-chi.blogspot.com/2025/03/buttoncolorwhiteborder.html
https://lu-chieh-chi.blogspot.com/2025/03/buttoncolorwhiteborder.html
回覆刪除作者已經移除這則留言。
回覆刪除作者已經移除這則留言。
回覆刪除https://egdvcn-gh.blogspot.com/2025/03/javascriptpython.html
回覆刪除https://yangsinmei.blogspot.com/2025/03/javascriptpython.html
回覆刪除https://yangbokai.blogspot.com/2025/03/javascriptpython.html
回覆刪除https://h5ying.blogspot.com/2025/03/javascriptpython.html
回覆刪除https://shanny11336108.blogspot.com/2025/03/javascriptpython.html
回覆刪除https://htmlsyuan.blogspot.com/2025/03/htmlcssjavascriptjavapython.html
回覆刪除https://laichia-jung.blogspot.com/2025/03/javascriptpython.html
回覆刪除https://guovupvmp.blogspot.com/2025/03/buttoncolorwhiteborder.html
回覆刪除https://yuxi1202.blogspot.com/2025/03/javascriptpython.html
回覆刪除https://huangchenyang.blogspot.com/2025/03/javascriptpython.html
回覆刪除https://yehjungwen.blogspot.com/2025/03/javascriptpython.html
回覆刪除https://sklnfijseifjsk.blogspot.com/2025/03/javascriptpython.html
回覆刪除https://allyking097.blogspot.com/2025/03/javascriptpython.html
回覆刪除https://hsulining9999.blogspot.com/2025/03/javascriptpython.html
回覆刪除https://yezonghan.blogspot.com/2025/03/javascriptpython.html
回覆刪除https://anson0501.blogspot.com/2025/03/javascriptpython.html
回覆刪除https://huangyunchieh.blogspot.com/2025/03/javascriptpython_18.html
回覆刪除https://wwersseraaer.blogspot.com/2025/03/javascriptpython.html
回覆刪除https://syx0304syx.blogspot.com/2025/03/javascriptpython.html
回覆刪除https://d11317133.blogspot.com/2025/03/buttoncolorwhiteborder.html
回覆刪除https://chenwewen.blogspot.com/2025/03/javascriptpython.html
回覆刪除https://jiang233.blogspot.com/2025/03/javascriptpython.html
回覆刪除https://djhdvdhd.blogspot.com/2025/03/javascriptpython.html
回覆刪除https://htmlcss-hsiao.blogspot.com/2025/03/javascriptpython.html
回覆刪除https://lintingyang11317134.blogspot.com/2025/03/javascriptpython.html
回覆刪除https://jjjjiaying.blogspot.com/2025/03/buttoncolorwhiteborder.html
回覆刪除https://chang-yam-ci.blogspot.com/2025/03/javascriptpython.html
回覆刪除https://lupeiying.blogspot.com/2025/03/javascriptpython.html
回覆刪除https://chrishong9595.blogspot.com/2025/03/javascriptpython.html
回覆刪除https://leelittle25147.blogspot.com/2025/03/javascriptpython.html
回覆刪除https://xiyuying.blogspot.com/2025/03/javascriptpython.html
回覆刪除https://xin00.blogspot.com/2025/03/button-push-pop-cssin-line-banks.html
回覆刪除https://jiang-jia-ehen.blogspot.com/2025/03/javascriptpython.html
回覆刪除https://ericfggf554466.blogspot.com/2025/03/javascriptpython.html
回覆刪除https://linchengxun.blogspot.com/2025/03/javascriptpython.html
回覆刪除https://ting22222.blogspot.com/2025/03/javascriptpython.htm
回覆刪除https://zhuo-you-wen.blogspot.com/2025/03/javascriptpython.html
回覆刪除https://huangjunzhu.blogspot.com/2025/03/javascriptpython.html
回覆刪除https://zzy-hn.blogspot.com/2025/03/javascriptpython.html
回覆刪除https://xie-ni.blogspot.com/2025/03/javascriptpython_18.html
回覆刪除0319.完美執行CSS顏色佳https://xie-ni.blogspot.com/2025/03/javascriptpython_18.html
刪除