zoukankan      html  css  js  c++  java
  • php之jquery

    <!DOCTYPE html>

    <html>

    <head>

    <script type="xxx.js"></script>

    <script>

     function myFunciton(){

    $("#demo").html("hello jquery")

    $("#a").attr("style","color:red").html("hello")

    $(document).ready(myFunction);

    }

    </script>

    </head>

    <body>

    <h1 id="demo"></h1>

    <h1 id="a"></h1>

    </body>

    </html>

    function myFunction()

    {

        var obj="document.getElementById("demo");

        obj.innerHTML="Hello prorotype";

    }

    onload=myFunction;

    function myFunction()

    {

     $("#demo").insert("hello prototype");

    }

    Event.observe(window,"load",myFunction);

    observe  receive three parameter

    1.which HTML you would like to handle

    2.which event you want to do

    3.which function you would like to handle

    function myFunction()

    {

       $("#demo").insert("hello boys");

    }

       Event.observe(windows,"load",myfunction);

    prototype eg:

    <!DOCTYPE html>

    <html>

    <head>

    <script src="xxx.js"></script>

    <script>

    function myFunction()

    {

    $("#demo").writeAttribute("style","color:red").insert("hello protorype")

    }

    Event.observe(windows,"load",myFunction);

    </script>

    </head>

    <body>

    <h1 id="demo"></h1>

    </body>

    </html>

  • 相关阅读:
    vue 根据时间时间区间搜索功能
    vue 分页
    ubuntu18 vscode ros 配置
    在ubuntu16上用vscode编译ros历程记录
    word:页眉头部出现一条横线
    word:设置基偶页不同和页眉页脚
    多级标题
    添加论文应用
    添加论文尾注2(交叉引用)
    三线表
  • 原文地址:https://www.cnblogs.com/teyues/p/5732032.html
Copyright © 2011-2022 走看看