href的使用(href的全称)
href可以放在什么标签中使用?
href提示链接的语句,在p,meta大多数里都可以使用吧,建议去复习下html语言
window.location.href的用法
javascript 中的 location.href 有很多种用法,主要如下:
self.location.href="/url" 当前页面打开
location.href="/url" 当前页面打开
windows.location.href="/url" 当前页面打开,前面三个用法相同
this.location.href="/url" 当前页面打开
parent.location.href="/url" 在父页面打开新页面
top.location.href="/url" 在顶层页面打开新页面
location.open("/url"); 打开一个新的窗口页
如果页面中自定义了 frame ,那么可将 parent self top 换为自定义 frame 的名称,效果是在 frame 窗口打开 url 地址

在HTML中URL、src、href分别代表什么?如何使用?
src 是指向物件的来源
href 是指向需要连结的地方
url 是通用的 "连结" 的专业代名词,在 HTML 语法里几乎不会使用
src 通常用作 "拿取" 而 href 用作 "连结前往"
例如 img src="image.jpg" /
就是 src 拿取 image.jpg 作为这个 img 的源档案… 就是 img 显示 image.jpg 的意思
例如 a href="image.jpg" /
就是 href 跳转到 image.jpg… 就是网址会跳转到 image.jpg 的意思
这样理解吗?
a href 的用法
1.内部连接:a href="#/URL"name/a
2.锚记:a name="object-name"name/aa href="#object-name"name/a
3.外部链接:a href="URL"name/a
英文全称是 hypertext reference 表示一种超链接 ,
比如:a href=" .com"Google/a
这句话就表示建立一个以“Google”(字)为表象的网址链接。
4.特效链接
特效链接的目的不是跳转到其他位置,而是为了实现基本种页面特效,这种链接需要脚本来支持。
例:
JavaScript脚本:a href="javascript:alert('夜深了早点休息吧!')"点击我!/a
VBScript脚本:a href=vbscript:msgbox("现在时间是:"time)点击我!/a