Warning: error_log(/data/www/wwwroot/hmttv.cn/caches/error_log.php): failed to open stream: Permission denied in /data/www/wwwroot/hmttv.cn/phpcms/libs/functions/global.func.php on line 537 Warning: error_log(/data/www/wwwroot/hmttv.cn/caches/error_log.php): failed to open stream: Permission denied in /data/www/wwwroot/hmttv.cn/phpcms/libs/functions/global.func.php on line 537
<script src="https://lf6-cdn-tos.bytescm.com/obj/cdn-static-resource/tt_player/tt.player.js?v=20160723"></script>
一、超鏈接作用:
網(wǎng)頁間或本地文件間相互跳轉(zhuǎn)
二、超鏈接標簽:a
網(wǎng)頁跳轉(zhuǎn)示例:
<a href="https://www.baidu.com/">百度網(wǎng)站</a>
本地跳轉(zhuǎn)示例
<a href="second.html">跳轉(zhuǎn)到第二個網(wǎng)站</a>
效果:
點擊百度網(wǎng)站后,會跳轉(zhuǎn)到百度網(wǎng)站
href屬性:可以是跳轉(zhuǎn)的網(wǎng)頁或者本地文件的位置
target屬性:
1、_self 默認值,在原來窗口打開鏈接
2、_blank 在新窗口打開鏈接(常用)
3、_parent 在父窗口打開鏈接
4、_top 在頂層窗口打開鏈接
示例:
<a href="https://www.baidu.com/" target="_blank">百度網(wǎng)站</a>
三、錨點鏈接
有些頁面內(nèi)容比較多,導致頁面過長,此時用戶需要不停拖動瀏覽器上的滾動條才可以看到下面的內(nèi)容。為了方便用戶操作,我們可以使用錨點鏈接來優(yōu)化用戶體驗。
法1:使用onclick事件
<input type="button" value="按鈕" onclick="javascrtpt:window.location. />
或者直接使用button標簽
<button onclick="window.location.>百度</button>
方法2:在button標簽外套一個a標簽
<a > <button>百度</button> </a>
或使用
<a ><input type="button" value='百度'></a>
方法3:使用JavaScript函數(shù)
方api:https://uniapp.dcloud.io/component/rich-text.html
富文本<rich-text>標簽提供了攔截點擊事件@itemclick,可以攔截點擊事件(只支持a、img標簽),返回當前節(jié)點信息。
<rich-text :nodes="mcontent" @itemclick="itemclick"></rich-text>
*請認真填寫需求信息,我們會在24小時內(nèi)與您取得聯(lián)系。