zoukankan      html  css  js  c++  java
  • temp

    <!DOCTYPE html>
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta name="content-type" content="text/html; charset=UTF-8">

    <title>对话框测试</title>

    <script>
    var contacts = [
    {
    "firstName": "Akira",
    "lastName": "Laine",
    "number": "0543236543",
    "likes": ["Pizza", "Coding", "Brownie Points"]
    },
    {
    "firstName": "Harry",
    "lastName": "Potter",
    "number": "0994372684",
    "likes": ["Hogwarts", "Magic", "Hagrid"]
    },
    {
    "firstName": "Sherlock",
    "lastName": "Holmes",
    "number": "0487345643",
    "likes": ["Intriguing Cases", "Violin"]
    },
    {
    "firstName": "Kristian",
    "lastName": "Vos",
    "number": "unknown",
    "likes": ["Javascript", "Gaming", "Foxes"]
    }
    ];


    function lookUp(firstName, prop){
    // 请把你的代码写在这条注释以下
    for(var i=0;i<contacts.length;i++){
    if(contacts[i].firstName == firstName ){

    }
    }

    // 请把你的代码写在这条注释以上
    }

    // 你可以修改这一行来测试你的代码


    </script>
    </head>

    <body>

    对话框测试:

    <div style="margin-top:50px">
    <input type="button" value="alert" onclick='lookUp("Akira", "likes")' />
    <input type="button" value="alert" onclick='lookUp("Kristian", "lastName")' />
    <input type="button" value="alert" onclick='lookUp("Sherlock", "likes")' />
    <input type="button" value="alert" onclick='lookUp("Bob", "number")' />
    <input type="button" value="alert" onclick='lookUp("Akira", "address")' />
    </div>
    </body>
    </html>

    问题网址:http://www.freecodecamp.cn/challenges/profile-lookup

    答案网址:http://www.cnblogs.com/qimeng/p/6847985.html

  • 相关阅读:
    python的paramiko模块的安装与使用
    python的paramiko模块的安装与使用
    python的paramiko模块的安装与使用
    Python中的getattr()函数详解
    Python中的getattr()函数详解
    Python模块学习——optparse
    Python模块学习——optparse
    Python模块学习——optparse
    pkg_resources----Entry Points为程序提供扩展点
    pkg_resources----Entry Points为程序提供扩展点
  • 原文地址:https://www.cnblogs.com/lwmp/p/7182749.html
Copyright © 2011-2022 走看看