我用dw做的jsp网页,里面加了设为主页,加入收藏等,但是点击后网页底部出现网页上有错误!
代码:<area shape="rect" coords="514,1,594,25" onclick="this.style.behavior='url(#default#homepage)';this.setHomePage('http://www.sina.com/');" href="#"/>怎么办啊?请教高手!

解决方案 »

  1.   

    <P style="HEIGHT: 30px"><A 
    onclick="this.style.behavior='url(#default#homepage)';this.setHomePage('http://www.baidu.com')" 
    href="http://utility.baidu.com/traf/click.php?id=215&amp;url=http://www.baidu.com">把百度设为主页</A></P>
      

  2.   

    我的博客
     上面有
    楼主可看看
    http://blog.163.com/cdf_2008/blog/static/76064778200941825858238/
      

  3.   

    你把百度的网址换成你自己的不就行了?真是服了you了
      

  4.   

    <%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %>
    <jsp:useBean id="vote" scope="page" class="com.VoteConn.VoteConn"/>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <script type="text/javascript">
    function startTime()
    {
    var today=new Date()
    var h=today.getHours()
    var m=today.getMinutes()
    var s=today.getSeconds()
    // add a zero in front of numbers<10
    m=checkTime(m)
    s=checkTime(s)
    document.getElementById('txt').innerHTML=h+":"+m+":"+s
    t=setTimeout('startTime()',500)
    }function checkTime(i)
    {
    if (i<10) 
      {i="0" + i}
      return i
    }
    </script>
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
    <title>中心首页</title>
    <style type="text/css">
    <!--
    a:link {
    text-decoration: none;
    }
    a:visited {
    text-decoration: none;
    }
    a:hover {
    text-decoration: none;
    }
    a:active {
    text-decoration: none;
    }
    .STYLE1 {font-size: 2px}
    .STYLE2 {
    font-size: 14px;
    color: #C1161E;
    }
    .STYLE3 {color: #C1161E}
    .STYLE11 {color: #FFFFFF; font-family: "宋体"; font-size: 14px;}
    .STYLE12 {color: #FFFFFF; font-size: 14px;}
    body {
    background-image: url(images/beijing.jpg);
    }
    .STYLE13 {font-size: 12px}
    -->
    </style></head><body>
    <table width="800" height="800" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
      <tr>
        <td><table width="800" height="192" border="0" cellpadding="0" cellspacing="0">
          <tr>
            <td height="192"><table width="800" height="180" border="0" cellpadding="0" cellspacing="0">
              <tr>
                <td><table width="800" height="180" border="0" cellpadding="0" cellspacing="0">
                    <tr>
                      <td><img src="images/logo.jpg" width="798" height="180" border="0" usemap="#Map2" /></td>
                    </tr>
                  </table>
                  <table width="800" height="21" border="0" cellpadding="0" cellspacing="0">
                    <tr>
                      <td><img src="images/daohang.jpg" width="798" height="20" border="0" usemap="#Map" /></td>
                    </tr>
                  </table></td>
              </tr>
            </table>
              </td>
          </tr>
        </table>
        <table width="800" height="683" border="0" cellpadding="0" cellspacing="0">
          <tr>
            <td height="21" colspan="2"><table width="800" border="0" cellpadding="0" cellspacing="0">
                <tr>
                  <td><table width="800" border="0" cellpadding="0" cellspacing="0">
                    <tr>
                      <td width="520"><span class="STYLE2">首  页</span></td>
                      <td width="280">&nbsp;</td>
                    </tr>
                  </table></td>
                </tr>
              </table></td>
            </tr>
          <tr>
            <td width="275" height="225" bgcolor="#EBEBEB"><table width="273" height="223" border="0" cellpadding="0" cellspacing="0" bordercolor="#C1161E" bgcolor="#EBEBEB">
              <tr>
                <td><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="273" height="223">
                    <param name="movie" value="huandeng.swf" />
                    <param name="quality" value="high" />
                    <embed src="huandeng.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="273" height="223"></embed>
                </object></td>
              </tr>
            </table></td>
            <td width="525"><table width="525" height="215" border="0" cellpadding="0" cellspacing="0">
    <tr>
    <td><img src="images/xinwen.jpg" width="525" height="25" /></td>
    </tr><tr>
    <td height="200" valign="top">
    <ul class="STYLE13">
    <% ResultSet rs1 = vote.executeQuery("select * from news where theme='xinwen' order by id desc");%><% while(rs1.next()) { %>             
    <li><a href="xinwen1.jsp?id=<%=rs1.getString("id")%>"><font color="#000000"><%=rs1.getString("title")%></font>&nbsp;&nbsp;&nbsp;&nbsp;<font color="#C1161E"><%=rs1.getString("datetime").substring(0,10)%></font></a></li>
    <%
    }
    rs1.close();
    %>
    </ul>
    </td>
    </tr>
    </table></td>
          </tr>
          <tr>
            <td height="230" bgcolor="#EBEBEB"><table width="200" height="100" border="0" align="center" cellpadding="0" cellspacing="0">
              <tr>
                <td height="120"><div align="center"><img src="images/toupiao1.jpg" width="200" height="120" /></div></td>
              </tr>
              <tr>
                <td><p align="center"><%ResultSet rs = vote.executeQuery("select * from vote");%><form action="vote.jsp">
    <% while(rs.next()) { %>      
       
    <input type="radio" name="type" value=<%=rs.getString("id")%>><%=rs.getString("content")%>

    <%
    }
    rs.close();
    %>                <input type="submit" name="Submit" value="投票" />&nbsp;&nbsp;&nbsp;&nbsp;<input type="submit" name="Submit1" value="查看" /> 
                    </form>
                  </td>
              </tr>
            </table></td>
            <td><table width="525" height="100" border="0" cellpadding="0" cellspacing="0">
              <tr>
                <td height="25"><img src="images/tonggao.jpg" width="525" height="25" /></td>
              </tr>
              <tr>
                <td height="195" valign="top"><ul class="STYLE13">
    <% ResultSet rs2 = vote.executeQuery("select * from news where theme='tonggao' order by id desc");%><% while(rs2.next()) { %>             
    <li><a href="xinwen1.jsp?id=<%=rs2.getString("id")%>"><font color="#000000"><%=rs2.getString("title")%></font>&nbsp;&nbsp;&nbsp;&nbsp;<font color="#C1161E"><%=rs2.getString("datetime").substring(0,10)%></font></a></li>
    <%
    }
    rs2.close();
    %>
    </ul></td>
              </tr>
            </table></td>
          </tr>
          <tr>
            <td bgcolor="#EBEBEB"><table width="275" height="100" border="0" cellpadding="0" cellspacing="0">
                <tr><td align="right">
                  <tr>
                <td align="right">
                  <form name="form1" method="post" action="main.jsp""><select name="searchContent" style='font-size:9pt;'>
            <option value="newsAll">所有</option>
            <option value="title">标题</option>
            <option value="author">作者</option>
            <option value="content">内容</option>
          </select>&nbsp;&nbsp;<input type="text" name="searchKeyword" value="请输入关键字" style='font-size:9pt;' size="14" maxlength="50">&nbsp;&nbsp;<input type="submit" name="submit" value="站内搜索" ></form></td></tr>
                               <tr>
                <td align="right">
    <form method=get action="http://www.google.com/search"><img src="images/zhanwaisousuo.jpg" width="100" height="20" />
    <input name=q type=text size="10">
    <input type=submit name=btnG value="搜索">
    <input type=hidden name=ie value=GB2312>
    <input type=hidden name=oe value=GB2312>
    <input type=hidden name=hl value=zh-CN>
    <input type=hidden name=domains value="202.206.197.231:8080">
    <input type=hidden name=sitesearch value="202.206.197.231:8080">
    </form>            </td>
              </tr>
              <tr>
                <td align="right">
                  <img src="images/youqinglianjie.jpg" width="99" height="20" />
                  <select onchange='goToPage(this)'>
    <option value=''>---请选择---</option>
    <option value='http://www.heuet.edu.cn'>河北</option>
    <option value='http://202.206.196.103/jiaowuzaixian/index.aspx'>河北</option>
      </select>
    <script>
    function goToPage(obj){
    location.href = obj.options.value;
    }
    </script> </td>
              </tr>
            </table></td>
            <td><table width="525" height="100" border="0" cellpadding="0" cellspacing="0">
              <tr>
                <td><div align="center"><img src="images/liuyanban.jpg" width="525" height="100" align="middle" /></div></td>
              </tr>
            </table></td>
          </tr>
          <tr>
            <td colspan="2"><table width="800" height="50" border="0" cellpadding="0" cellspacing="0">
              <tr>
                <td bgcolor="#C1161E"><table width="800" border="0">
                  <tr>
                    <td><div align="center" class="STYLE12"></div></td>
                  </tr>
                  <tr>
                    <td><div align="center" class="STYLE11">站 长 :难 得 糊 涂</div></td>
                  </tr>
                </table></td>
              </tr>
            </table></td>
            </tr>
        </table></td>
      </tr>
    </table>
    <map name="Map" id="Map"><area shape="rect" coords="2,1,100,21" href="index.jsp" />
    <area shape="rect" coords="100,1,199,21" href="zxgk.jsp" />
    <area shape="rect" coords="199,2,297,21" href="zxly.jsp" />
    <area shape="rect" coords="297,3,397,21" href="wlzy.jsp" />
    <area shape="rect" coords="397,2,499,21" href="xnsys.jsp" />
    <area shape="rect" coords="499,2,604,21" href="syskf.jsp" />
    <area shape="rect" coords="701,3,797,21" href="sysgl.jsp" />
    <area shape="rect" coords="604,2,700,21" href="jxgl.jsp" />
    </map><map name="Map2" id="Map2"><area shape="rect" coords="493,0,593,26" onclick="this.style.behavior='url(#default#homepage)';this.setHomePage('http://127.0.0.1:8080/jgzx/');" href="#" /></map></body>
    </html>
      

  5.   

    最后面得 <map name="Map2" id="Map2"> <area shape="rect" coords="493,0,593,26" onclick="this.style.behavior='url(#default#homepage)';this.setHomePage('http://127.0.0.1:8080/jgzx/');" href="#" /> </map>就是设为首页的链接