日期:2014-05-16  浏览次数:20393 次

javascript 通过变量调用函数
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html>

  <head>

    <title>MyHtml.html</title>

      

    <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">

    <meta http-equiv="description" content="this is my page">

    <meta http-equiv="content-type" content="text/html; charset=UTF-8">

    

    <!--<link rel="stylesheet" type="text/css" href="./styles.css">-->

      <script type="text/javascript">

      function fn(s){

            alert(s);

      }

      function load(name,str){

            name(str);

      }

      </script>

  </head>

  

  <body onload="load(fn,'ok,yes!')">

    This is my HTML page. <br>

  </body>

</html>