简体   繁体   中英

HTML button inside the anchor

I m using a button inside anchor

Here is code

<a href="<?php echo $INCLUDE_ROOT_DIRECTORY. 'mailer_add_contents.php'; ?>" >
   <input type="button" value="Add Contents" style="float: right; margin-top: 5px;" class="button_link" />

This code is not working in IE. I m clicking on button but it does not go anywhere.

或者,您可以将onclick属性添加到按钮以重定向,而不是将其包装在链接中:

<input type="button" onclick = "window.location = '<?php echo $INCLUDE_ROOT_DIRECTORY. 'mailer_add_contents.php'; ?>'" />

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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