<input type="button" name="Button" value="Button" onclick="document.title.='大海'">

解决方案 »

  1.   

    <html>
    <head>
    <title>lansa</title>
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
    </head><body bgcolor="#FFFFFF" leftmargin="0" topmargin="0">
    <div align="center">
      <input type="button" name="Button" value="Button" onclick="document.title='大海'">
      <input name="wwwq" type="text" id="wwwq" value="qqqq">
    </div>
    </body>
    </html>
      

  2.   

    ----main.htm------------
    <html>
    <head>
    <title>lansa</title>
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
    </head><body bgcolor="#ff0000">
    <iframe src="Untitled-1.htm" width="100%"></iframe>
    </body>
    </html>
    ----Untitled-1.htm------------
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
    <title>Folders</title></head>
    <body >
    <input type="button" name="Button" value="Button" onclick="parent.title='大海'">
    </body>
    </html>如果我要通过Untitled-1.htm文件中的onclick事件改变main.htm文件的title的值,怎么写代码?
      

  3.   

    <script language="javascript">
      this.title="大海的字符串";
    </script>