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

    html代码:

    <!doctype html public "-//w3c//dtd xhtml 1.0 transitional//en" "http://www.w3c.org/tr/xhtml1/dtd/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3x.org/1999/xhtml">
        <head>
            <title>Javascript Day01</title>
            <meta http-equlv="content-type" content="text/html;charset=utf-8"/>
            <script language="javascript" src="js_demo1.js" type="text/javascript"></script>
            <script language="javascript" type="text/javascript">
                function firstMethod(){
                    alert("Hello World in script block.");
                }
                </script>
            </head>
            <form>
                <h2>1.Hello Word</h2>
                <input type="button" value="first button" onclick="alert('Hello Word');"/>
                <input type="button" value="second button" onclick="firstMethod();"/>
                <input type="button" value="third button" onclick="secondMethod();"/>
            </form>
        </body>
    </html>
               

    js_demo1.js

    function secondMethod(){
        alert("hello world");
    }

  • 相关阅读:
    python基础(str,list,tuple)
    MySQL数据类型概念
    Ubuntu安装sublime
    Ubuntu安装pycharm
    ubuntu安装mysql
    微信小程序注册开发流程
    新开篇
    被玩坏了的题——马的遍历
    一道数学恶心题——小凯的疑惑
    搜索基础题:八皇后
  • 原文地址:https://www.cnblogs.com/ls00/p/6958122.html
Copyright © 2011-2022 走看看