ASP.NET中怎样将页面设为首页,加入收藏
1、文字js脚本事件:<span onClick="var strHref=window.location.href;this.style.behavior=’url(#default#homepage)’;this.setHomePage(‘http://www.unvs.cn’);" style="CURSOR: hand">
2、文字链接事件:<a href="#" onClick="window.external.addFavorite(‘http://blog.unvs.cn’,'Unvs博客’)"title=Unvs博客’ >
<input type=button value=导入收藏夹 onclick=window.external.ImportExportFavorites(true,"http://www.unvs.cn/");>
<input type=button value=导出收藏夹 onclick=window.external.ImportExportFavorites(false,"http://www.unvs.cn/");>
<input type=button value=整理收藏夹 onclick="window.external.ShowBrowserUI(‘OrganizeFavorites’, null)">
<input type=button value=查看源文件 onclick="window.location = ‘view-source:’+ window.location.href">
<input type=button value=语言设置 onclick="window.external.ShowBrowserUI(‘LanguageDialog’, null)">
<input type=button value=加入收藏夹 onclick="window.external.AddFavorite(‘http://www.fsing.net/’, ‘风信子网络’)">
<input type=button value=加入到频道 onclick="window.external.addChannel(‘http://www.fsing.net/’)">
<input type=button value=设成主页 onclick="this.style.behavior=’url(#default#homepage)’;this.setHomePage(‘http://www..****..com/’)">
3、给一个网站上设置"设为主页"和"加入收藏夹"的代码应该怎么写?(在一个小图片上面加)
<A href="#" onmouseover="window.external.addFavorite(‘http://www.****.com/’,'e时区特色论坛’)" target="_self" >收藏本页</A>
<a href="#" onmouseover="this.style.behavior=’url(#default#homepage)’;this.setHomePage(‘http://www.****.com/’);" target="_self">设为主页</a>
4、用javascript来实现,写在控件的onclick中
网上查的javascript例子(onclick中是具体的实现)<table align="center">
<tr>
<td onclick="window.location.href;this.style.behavior=’url(#default#homepage)’;this.setHomePage(‘http://blog.unvs.cn/‘);" style="CURSOR:Hand"><font color=black>设为首页 </font></td>
<td onclick="window.external.AddFavorite(location.href,document.title);" style="CURSOR:Hand"><font color=black>加入收藏</font></td>
</tr>
</table>
设为主页
<A href=# onclick="this.style.behavior=’url(#default#homepage)’;this.setHomePage(‘http://www.baidu.com’);">图片</A>
—————————————–
加如收藏
<A href="javascript:window.external.AddFavorite(‘http://www.baidu.com’,'百度’)">图片</A>
加入收藏
<a href="javascript:window.external.AddFavorite(‘http://www.baidu.com’,'百度’)">加入收藏</a>
首页
<span onclick="var strHref=window.location.href;this.style.behavior=’url(#default#homepage)’;this.setHomePage(‘http://www.baidu.com’);" style="CURSOR: hand"><br>设为首页</br></span>
<a href=# onClick="this.style.behavior=’url(#default#homepage)’;this.setHomePage
(‘http://www……/’);">设为首页</a> <IMG height=11
src="data:images/dot.gif" width=12 border=0> <a href=# onClick="window.external.addFavorite(‘http://www……/’,'****’);return(false)">收藏本站</a>
将其中"www……"换成你的网页地址
"****"换成你的网站名字
ASP.NET中怎样将页面设为首页,加入收藏的更多相关文章
- ASP.Net中后台控制页面提示信息的显示方式
ASP.Net中后台控制页面提示信息的显示方式 用于删除或修改成功后的显示:(背景No空白) ScriptManager.RegisterStartupScript(this, typeof(Pa ...
- 请解释ASP. NET中的web页面与隐藏类之间的关系
请解释ASP.NET中的web页面与其隐藏类之间的关系 其实页面与其隐藏类之间就是一个部分类的关系,你在页面上放一个一个的控件就是在这个类中定义一个一个的属性, 因为是同一个类的部分类的关系,所以隐藏 ...
- 设为首页 和 收藏本站js代码 兼容IE,chrome,ff
设为首页 和 收藏本站js代码 兼容IE,chrome,ff //设为首页 function SetHome(obj,url){ try{ obj.style.behavior='url(#defau ...
- 设为首页/加入收藏JS代码
传统网站常用的设为首页/加入收藏js代码 <a href="javascript:void(0)" onclick="sethome(this,window.loc ...
- ASP.NET—015:ASP.NET中无刷新页面实现
原文作者:杨友山 原文地址:http://blog.csdn.net/yysyangyangyangshan/article/details/39679823 前面也说过在asp.net中前后前交互的 ...
- ASP.NET中的加密页面机制
本节介绍ASP.NET对视图信息的加密功能.Page.RegisterRequiresViewStateEncryption方法就是将控件注册为需要视图状态加密的控件.如果您要开发用于处理潜在的敏感信 ...
- javascript 设为首页 | 加入收藏夹 JS代码
我们介绍一个可兼容所有浏览器的加入收藏代码代码,大概原理是这样的我们根据获取用户navigator.userAgent.toLowerCase()信息来判断浏览器,根据浏览器是否支持加入收藏js命令, ...
- HTML设为首页/加入收藏代码
(特别注意:要把'这个符号换成无任何输入法状态中输入的'这个符号,否则程序无法运行) 1.文字型: <a onclick="this.style.behavior='url ...
- JS代码实现网站设为首页加入收藏功能
<script language="javascript"> //加入收藏 function AddFavorite(sURL, sTitle) { try { win ...
随机推荐
- 匿名内存 | shm
page_is_file_cache是和swapbacked互斥的,所以说对于匿名页来说,分配的时候就就会把PageSwapBacked给设置上,page->mapping_address = ...
- [Java] 各种常用函数
1.writeInt()和readInt() 这两个函数并不是写入一个整数,读取一个整数.它们实际上是写入4个字节,读取4个字节. writeInt(int i)把i按四个字节,二进制形式写到输出流里 ...
- D. Equalize the Remainders (set的基本操作)
D. Equalize the Remainders time limit per test 3 seconds memory limit per test 256 megabytes input s ...
- Linux 安装编译 FFMPEG
资源准备: ffmpeg-3.4.tar.bz2 yasm-1.3.0.tar.gz 编译安装: 本人二进制包存放在 /opt/moudles中, 解压缩在 /opt/softwares 解包 ffm ...
- 转:安装成功的nginx如何添加未编译安装模块
原已经安装好的nginx,现在需要添加一个未被编译安装的模块 举例说明:安装第三方的ngx_cache_purge模块(用于清除指定URL的缓存) nginx的模块是需要重新编译nginx,而不是像a ...
- jquery中的get和post、ajax有关返回值的问题描述
一:前言 今天我就要离开公司回学校准备考试,在走之前,我自己做的一个模块测试除了一些小的bug.问题如下 我在往数据库中插入数据,首先要选择一级菜单,接着会更具一级菜单生成一级菜单的子目录,在选择日期 ...
- 【BZOJ2738】矩阵乘法 [整体二分][树状数组]
矩阵乘法 Time Limit: 20 Sec Memory Limit: 256 MB[Submit][Status][Discuss] Description 给你一个N*N的矩阵,不用算矩阵乘 ...
- python基础之函数(自定义函数)
函数: 函数的定义: 初中数学函数定义:一般的,在一个变化过程中,如果有两个变量x和y,并且对于x的每一个确定的值,y都有唯一确定的值与其对应,那么我们就把x称为自变量,把y称为因变量,y是x的函数. ...
- Linux core dump file详解
Linux core dump file详解 http://www.cnblogs.com/langqi250/archive/2013/03/05/2944931.html
- win7中下载和安装redis
下载地址:https://github.com/MicrosoftArchive/redis/releases 这里我下载的是3.2.100版本,下载zip,然后解压.解压后如图所示: 开启redis ...