劉任昌JavaScript輸出與輸入的程式碼
JavaScript輸出與輸入的程式碼
輸入字串:
JavaScript程式碼
<p>輸入字串:<input type="text" len="50" id="in"></p>
<p><input type="button" value="執行JavaScript" onclick="f()"></p>
<p id="out"></p>
<script>
function f(){
var a = document.getElementById("in").value;/*取得id=in的文字*/
var b = "原字串: "+a+"<br>長度是:"+a.length+"<br>反串是: ";
var c = "";
for (var i = 0; i < a.length; i++)
c = a.slice(i,i+1) + c;
b = b +"<font size=7>" +c + "</font>";
document.getElementById("out").innerHTML = b;/*輸出html指令*/
}
</script>
https://kingthegreatliu.blogspot.com/2023/01/javascript.html
回覆刪除https://d11150112.blogspot.com/2023/01/javascript.html
回覆刪除作者已經移除這則留言。
回覆刪除https://rtytrdtfg.blogspot.com/2023/01/h1bordersolid-8px-purple-javascript.html
回覆刪除https://d11150116.blogspot.com/2023/01/javascript.html
回覆刪除https://d11150115.blogspot.com/2023/01/javascript.html
回覆刪除https://cindy-javascript.blogspot.com/2023/01/javascript.html
回覆刪除https://tgyhjikolujik2554.blogspot.com/2023/01/javascript.html
回覆刪除https://lihtml-css-javascript-java.blogspot.com/2023/01/javascript.html
回覆刪除https://643gjeytfru4312.blogspot.com/2023/01/javascript.html
回覆刪除https://d11150114.blogspot.com/2023/01/javascript.html
回覆刪除https://enchenghu0905.blogspot.com/2023/01/javascript.html
回覆刪除https://d11150108.blogspot.com/2023/01/javascript.html
回覆刪除https://www.blogger.com/blog/post/edit/2503769166705683616/4238664622796537746
回覆刪除https://jdoifjopq1264.blogspot.com/2023/01/blog-post.html
回覆刪除https://unnnn20.blogspot.com/2023/01/javascriptinputtextgetelementbyid.html
回覆刪除https://d11150113.blogspot.com/2023/01/javascript.html
回覆刪除https://xinyijava.blogspot.com/2023/01/d11050134-javascript.html
回覆刪除https://iuytjhg5261.blogspot.com/2023/01/h1-background-color-red-border-solid.html
回覆刪除