admin管理员组

文章数量:1536713

问题描述:在360浏览器内 点击a标签无效,页面不跳转。谷歌火狐浏览器没问题。

发现问题:由于a标签父元素是button导致无法跳转页面

<button type="button" class="btn btn-info"> 
	<a href="{{asset('hotel/list')}}'" >返 回</a>
</button>

解决办法

1、使用 onclick代替a标签跳转

<button type="button" class="btn btn-info"
 onclick="location='{{asset('hotel/list')}}';return false" >
 		返 回
 </button>

2、阻止a标签冒泡事件

event.stopPropagation();

3、去掉button标签

<a href="{{asset('hotel/list')}}'"  class="btn btn-info">返 回</a>

本文标签: 跳转浏览器标签页面