給出一個javascript的Helloworld例子


1.基礎知識:
Helloworld:
例 1.1
<html>
<head>
    <!--  如果你用notepad建立一個txt之后你再改為html,一定在存時,要存成utf-8或unicode格式,或者你也可以用 myeclipse html designer,這樣你看的文本是有顏色的,如果覺得字體小,可以在myeclipse html designer下面的窗口里右擊鼠標,/preferences/general/editor/text editor.注意在texteditor窗口里面的右邊最下面,有一行不起眼你的小字,color and font,你可以設置。-->
</head>
<script type="text/javascript">
    var a ;
    /*before you set value, a' type can not be defined.*/
    document.writeln(typeof(a) + "<br>他們");
    a = true;
    document.writeln(typeof(a) + "<br>");
    /*下面的console.log只有安裝了firebug的firebox不報錯*/
    console.log("This is the 1 message 馬克-to-win write in %s", a);
    document.writeln(a);
</script>我們

文章轉載自原文:https://blog.csdn.net/qq_44594249/article/details/97655818


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM