锚标签不能正常工作

时间:2015-08-06 11:00:33

标签: php html

锚标记不起作用,是否存在语法错误?

<button type="button" class="btn btn-default" onclick="window.location.href='/user/<?php echo $user->uid; ?>/edit#shops'" >επιλέξτε εδώ</button>
  

来自firebug的网址转换为:http://www.website.com/user/1/edit#shops

1 个答案:

答案 0 :(得分:4)

您为何使用button使用a代码

 <a href="/user/<?php echo $user->uid; ?>/edit#shops">επιλέξτε εδώ</a>