{button} <a> not working in SharePoint page

时间:2016-03-25 10:51:25

标签: html redirect button sharepoint

I need to create an image slider which shows the image sliding one by one. I have a SharePoint page where the slider is implemented. I have used Amazing Slider While generating the Read More button. The HTML which is being generated for button is like below:

<a href="http://www.google.com"><button class="as-btn-blue-medium">Read  more...</button></a>
The button is generated perfectly, but when I click on it is refreshing the page not redirecting me to the 内的

1 个答案:

答案 0 :(得分:0)

<button>中包含<a>无效的html。请参阅嵌套{{3}}的允许元素列表。为了最大限度地与sharepoint兼容,您可能希望执行以下操作:

<button onclick="window.location='http://www.google.com'" class="as-btn-blue-medium">Read  more...</button>