Heim > Web-Frontend > HTML-Tutorial > “设为首页”和“加入收藏”点击没有任何反应,为什么?谢谢高手_html/css_WEB-ITnose

“设为首页”和“加入收藏”点击没有任何反应,为什么?谢谢高手_html/css_WEB-ITnose

WBOY
Freigeben: 2016-06-21 09:28:30
Original
1184 Leute haben es durchsucht

<!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><TITLE><%=SiteTitle%></TITLE><META http-equiv=Content-Type content="text/html; charset=gb2312"> <META content=<%=Sitekey%> name=keywords><META content=<%=Sitedes%> name=description><LINK href="imgbej/style.css" type=text/css rel=stylesheet><SCRIPT src="imgbej/main_menu.js"></SCRIPT></head><BODY><TABLE width=1003 border=0 align="center" cellPadding=0 cellSpacing=0>  <TBODY>  <TR>    <TD>      <TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>        <TBODY>        <TR>          <TD width=500><IMG height=83 src="imgbej/logo.gif" width=500></TD>          <TD background="imgbej/topbg.gif">            <TABLE cellSpacing=0 cellPadding=0 width="92%" border=0>              <TBODY>              <TR>                <TD height=55> </TD></TR>              <TR>                <TD align=right><IMG height=12 src="imgbej/dot_home.gif" width=13 align=absMiddle> <A onclick="var strHref=window.location.href;this.style.behavior='url(#default#homepage)';this.setHomePage('http://www.baidu.com');" href="#">设为首页</A> <IMG height=9 src="imgbej/dot_en.gif" width=11 align=absMiddle> <A href="javascript:window.external.addFavorite(window.location.href,'http://')">加入收藏</A>                 </TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE></TD></TR>  <TR>    <TD>	<OBJECT codeBase="swflash.cab#version=9,0,28,0" width="1003" height="292" classid=clsid:D27CDB6E-AE6D-11cf-96B8-444553540000><PARAM NAME="movie" VALUE="flash/banner.swf"><PARAM NAME="quality" VALUE="high"><PARAM NAME="wmode" VALUE="opaque"><embed src="flash/banner.swf" quality="high" wmode="opaque" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="1003" height="292"></embed>          </OBJECT>    </TD>  </TR>  <TR><TD height=5></TD></TR></TBODY></TABLE><TABLE width=963 border=0 align="center" cellPadding=0 cellSpacing=0>  <TBODY>  <TR>    <TD width=2><IMG height=64 src="imgbej/menu_leftcn.gif" width=2></TD>    <TD background="imgbej/menu_bg.gif">      <TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>        <TBODY>        <TR>          <TD> </TD>          <TD width=80 background="imgbej/menu_03.gif"><A href="index.asp"><IMG class=sty onmouseover=nereidFade(this,100,15,10) onmouseout=nereidFade(this,01,10,15) height=64 src="imgbej/menu0_03.gif" width=80 border=0></A></TD>          <TD align=middle width=18><IMG height=64 src="imgbej/menu_sx.gif" width=2></TD>          <TD width=80 background="imgbej/menu_05.gif"><A href="Aboutus.asp?Title=企业简介"><IMG class=sty onmouseover=nereidFade(this,100,15,10) onmouseout=nereidFade(this,01,10,15) height=64 src="imgbej/menu0_05.gif" width=80 border=0></A></TD>          <TD align=middle width=18><IMG height=64 src="imgbej/menu_sx.gif" width=2></TD>          <TD width=80 background="imgbej/menu_07.gif"><A             href="NewsClass.asp?BigClass=企业新闻"><IMG class=sty onmouseover=nereidFade(this,100,15,10) onmouseout=nereidFade(this,01,10,15) height=64 src="imgbej/menu0_07.gif" width=80 border=0></A></TD>          <TD align=middle width=18><IMG height=64 src="imgbej/menu_sx.gif" width=2></TD>          <TD width=80 background="imgbej/menu_09.gif" ><A             href="Product.asp"><IMG class=sty onmouseover=nereidFade(this,100,15,10) onmouseout=nereidFade(this,01,10,15) height=64 src="imgbej/menu0_09.gif" width=80 border=0></A></TD>          <TD align=middle width=18><IMG height=64 src="imgbej/menu_sx.gif" width=2></TD>          <TD width=80 background="imgbej/menu_11.gif" ><A href="CompHonor.asp"><IMG class=sty onmouseover=nereidFade(this,100,15,10) onmouseout=nereidFade(this,01,10,15) height=64 src="imgbej/menu0_11.gif" width=80 border=0></A></TD>          <TD align=middle width=18><IMG height=64 src="imgbej/menu_sx.gif" width=2></TD>          <TD width=80 background="imgbej/menu_13.gif"><A             href="HrDemand.asp"><IMG class=sty onmouseover=nereidFade(this,100,15,10) onmouseout=nereidFade(this,01,10,15) height=64 src="imgbej/menu0_13.gif" width=80 border=0></A></TD>          <TD align=middle width=18><IMG height=64 src="imgbej/menu_sx.gif" width=2></TD>          <TD width=80 background="imgbej/menu_15.gif"><A href="Feedback.asp"><IMG class=sty onmouseover=nereidFade(this,100,15,10) onmouseout=nereidFade(this,01,10,15) height=64 src="imgbej/menu0_15.gif" width=80 border=0></A></TD>          <TD align=middle width=18><IMG height=64 src="imgbej/menu_sx.gif" width=2></TD>          <TD width=80 background="imgbej/menu_17.gif"><A             href="Aboutus.asp?Title=联系我们"><IMG class=sty onmouseover=nereidFade(this,100,15,10) onmouseout=nereidFade(this,01,10,15) height=64 src="imgbej/menu0_17.gif" width=80 border=0></A></TD>          <TD> </TD></TR></TBODY></TABLE></TD>    <TD width=4 background="imgbej/menu_bg.gif"></TD>    <TD vAlign=top width=181 background="imgbej/menu_bg.gif">      <TABLE cellSpacing=0 cellPadding=0 width="99%" border=0>        <TBODY>        <TR>          <TD height=2></TD></TR>        <TR>          <TD height="25" align=middle style="padding-top:1px;">            <SCRIPT language=JavaScript type=text/javascript>			setInterval("timer.innerHTML=new Date().toLocaleString();",1000); 			</SCRIPT>            <FONT color=#ffffff>      <DIV class=timee id=timer></DIV></FONT></TD></TR></TBODY></TABLE></TD>    <TD width=2><IMG height=64 src="imgbej/menu_rightcn.gif" width=2></TD></TR>  <TR><TD colSpan=5 height=7></TD></TR></TBODY></TABLE>	
Nach dem Login kopieren


回复讨论(解决方案)

你的代码只是针对IE10以下的版本有作用。

不支持火狐 GOOGLE,在网上找兼容版本的啊

<div> <a href="/">首页</a> |             <a onClick="SetHome(window.location)" href="javascript:void(0)">设为首页</a>             | <a onClick="AddFavorite(window.location,document.title)" href="javascript:void(0)">加入收藏</a>       </div>        <script type="text/javascript" language="javascript">     //加入收藏         function AddFavorite(sURL, sTitle) {             sURL = encodeURI(sURL);         try{                window.external.addFavorite(sURL, sTitle);            }catch(e) {                try{                    window.sidebar.addPanel(sTitle, sURL, "");                }catch (e) {                    alert("加入收藏失败,请使用Ctrl+D进行添加,或手动在浏览器里进行设置.");             }            }     }     //设为首页     function SetHome(url){         if (document.all) {             document.body.style.behavior='url(#default#homepage)';                document.body.setHomePage(url);         }else{             alert("您好,您的浏览器不支持自动设置页面为首页功能,请您手动在浏览器里设置该页面为首页!");         }     } </script>
Nach dem Login kopieren

要怎么修改啊????谢谢!

要怎么修改啊????谢谢!



上面给你代码了,你放到该放的地方,js放js文件里

谢谢,不错啊!

谢谢,不错啊!

你发现没。你老是遇到问题。一遇到问题就 发这里来了。然后 自己就去水帖子了 你这是什么节奏
Verwandte Etiketten:
Quelle:php.cn
Erklärung dieser Website
Der Inhalt dieses Artikels wird freiwillig von Internetnutzern beigesteuert und das Urheberrecht liegt beim ursprünglichen Autor. Diese Website übernimmt keine entsprechende rechtliche Verantwortung. Wenn Sie Inhalte finden, bei denen der Verdacht eines Plagiats oder einer Rechtsverletzung besteht, wenden Sie sich bitte an admin@php.cn
Beliebte Tutorials
Mehr>
Neueste Downloads
Mehr>
Web-Effekte
Quellcode der Website
Website-Materialien
Frontend-Vorlage