zoukankan      html  css  js  c++  java
  • 入门-1

    开发环境:webstorm 6.0

    基础铺垫:Web 2.0,XHTML和CSS

    javacript的重要作用:

    1. 基于web的应用程序的标准客户端脚本语言

    2. 服务器端的脚本基础

    程序调试前准备: 修改IE的Internet选项—安全-允许本地运行活动的内容

    高级-浏览-显示脚本错误的提示

    Netscape和Microsoft构建Javacript标准

    ch4_1.html

    <!DOCTYPE html>
    <html>
    <head>
        <title>First Program in Javascript</title>
        <script type = "text/javascript">
            <!--
                    document.writeln("<h1>Welcome to Javascript Programming!</h1>");
            //-->
        </script>
    </head>
    <body>
    
    </body>
    </html>
    
    
    <script type = "text/javascript">
            <!--
                   被封装的代码
                   如果浏览器支持,就执行;否则识别为注释
        
            //-->
        </script>

    Javascirpt中的字符串可以封装在双引号或单引号中

    每条语句添加分号隔开

    对大小写敏感

    ch4_2.xhtml

    <!DOCTYPE html>
    <html>
    <head>
        <title>Pringting a Line with Multiple statements</title>
        <script type="text/javascript">
            <!--
            document.write("<h1 style = "color: magenta">");
            document.write("Welcome to Javascript " + "Programming!</h1>");
            //-->
        </script>
    </head>
    <body></body>
    </html>

    ch4_3.html

    <!DOCTYPE html>
    <html>
    <head>
        <title>Pringting Multiple Lines</title>
        <script type="text/javascript">
            <!--
            document.writeln("<h1>Welcome to <br/> javascript<br/>" +
                    "Programming</h1>");
            //-->
        </script>
    </head>
    <body></body>
    </html>

    ch4_4.html

    <!DOCTYPE html>
    <html>
    <head>
        <title>Pringting Multiple Lines</title>
        <script type="text/javascript">
            <!--
            window.alert("Welcome to
    Javascript
    Programming!");
            //-->
        </script>
    </head>
    <body>
    <p>please refresh or reload this script again!</p>
    </body>
    </html>

    ch4_5.html

    <!DOCTYPE html>
    <html>
    <head>
        <title>Pringting Multiple Lines</title>
        <script type="text/javascript">
            <!--
            var name;
    
            name = window.prompt("Please enter your name");
    
            document.writeln("<h1>Hello, " + name + ", welcome to javascript programming!</h1>");
            //-->
        </script>
    </head>
    <body>
    <p>please refresh or reload this script again!</p>
    </body>
    </html>
  • 相关阅读:
    彻底弄懂三段式状态机
    关于verilog的有符号数与无符号数的转换
    关于win10系统安装vivado 2017.1 .2 .3 报runtime error 问题解决办法 亲测有效
    python的列表拷贝
    PYTHON
    保存linux下当前目录下所有文件的相对路径
    Git 命令及使用经验
    讯飞SDK的使用
    DE4加DVI子板实现静态图片显示
    HDL代码风格建议(2)乘法器和DSP推断
  • 原文地址:https://www.cnblogs.com/tmmuyb/p/8088088.html
Copyright © 2011-2022 走看看