简体   繁体   English

按钮内的HTML- HREF标签

[英]HTML- HREF Tag inside a Button

This is my button code, which has a reference tag, and the URL takes me to an index action correctly 这是我的按钮代码,带有参考标记,URL可以正确引导我执行索引操作

<button type="submit" class="btn btn-primary"><a style="color:white" href="<?php echo $this->basePath('calendar/details/index').'?month='.$this->previousMonth?>"> Previous </a></button>

and this is the picture of the button 这是按钮的图片

当前按钮预览

The problem is that only the text Previous on button is clickable, other than that any click on the blue part of the button does not work. 问题在于,只有按钮上的“ Previous on”按钮上的文本可以单击,而按钮的蓝色部分上的任何单击都不起作用。 How to make the whole area of the button work, without disturbing the URL? 如何在不干扰URL的情况下使按钮的整个区域正常工作?

 <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script> <link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet"/> <a class="btn btn-primary" style="color: white" href="#">Previous</a> 

<a class="btn btn-primary" style="color: white" href="<?php echo $this->basePath('calendar/details/index').'?month='.$this->previousMonth?>">Previous</a>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM