<p style="padding-right: 8px; padding-top:20px;">
<a id="A1" href="#" style="behavior: url(#default#homepage); color: white; text-decoration: none;"
onclick="this.style.behavior='url(#default#homepage)';this.setHomePage('<%=Util.FormatStr.GetAddress("") %>');return(false);"
/">设为首页</a> | <a href="#" style="color: white; text-decoration: none;" onclick="window.external.addFavorite('<%=Util.FormatStr.GetAddress("") %>','<%= Page.Title %>')">
加入收藏</a> | <a href="index.aspx" style="text-decoration: none; color: White;">返回首页</a>
</p>首页上的这些个东西,在其他浏览器上都可以,在火狐浏览器中不起作用,求助各位高手
<a id="A1" href="#" style="behavior: url(#default#homepage); color: white; text-decoration: none;"
onclick="this.style.behavior='url(#default#homepage)';this.setHomePage('<%=Util.FormatStr.GetAddress("") %>');return(false);"
/">设为首页</a> | <a href="#" style="color: white; text-decoration: none;" onclick="window.external.addFavorite('<%=Util.FormatStr.GetAddress("") %>','<%= Page.Title %>')">
加入收藏</a> | <a href="index.aspx" style="text-decoration: none; color: White;">返回首页</a>
</p>首页上的这些个东西,在其他浏览器上都可以,在火狐浏览器中不起作用,求助各位高手
解决方案 »
- vs2008 连接不上sql server2000
- 想用一个登录页面对两种用户角色登录后进入不同的页面?请问如何实现?
- 设计模式
- ajax问题 浏览器问题
- 用Gridview的时候分页有问题,一点其他页面Gridview就消失了
- ASP.NET中的DataGrid如何实现像WinForm中那样点击列名实现排序
- sqlConnection的连接关闭
- 在datagrid中的模版列的HeaderTemplate中加入imagebutton或RadioButton1怎样实现??
- 网页打开怎么这样慢呢?????
- asp.net运行环境的问题
- 如何在用户控件中触发内部DropDownList的OnSelectedIndexChanged
- 求正则表达式
Firefox是最标准的浏览器不兼容不严格的代码HTML标签
function AddFavorite(sURL, sTitle)
{
try
{
window.external.addFavorite(sURL, sTitle);
}
catch (e)
{
try
{
window.sidebar.addPanel(sTitle, sURL, “”);
}
catch (e)
{
alert(”加入收藏失败,请使用Ctrl+D进行添加”);
}
}
}
function SetHome(obj,vrl){
try{
obj.style.behavior=’url(#default#homepage)’;obj.setHomePage(vrl);
}
catch(e){
if(window.netscape) {
try {
netscape.security.PrivilegeManager.enablePrivilege(”UniversalXPConnect”);
}
catch (e) {
alert(”此操作被浏览器拒绝!请在浏览器地址栏输入“about:config”并回车然后将[signed.applets.codebase_principal_support]设置为’true’”);
}
var prefs = Components.classes['@mozilla.org/preferences-service;1'].getService(Components.interfaces.nsIPrefBranch);
prefs.setCharPref(’browser.startup.homepage’,vrl);
}
}
}
</script>
<a href=”javascript:void(0);” target=”_self” onClick=”javascript:AddFavorite(’URL’,'标题’)” >收藏</a>
<a href=”javascript:void(0);” target=”_self” onclick=”SetHome(this,’URL’)”>设为首页</a>