The following html not working in IE? [closed]
<a href="Signup.php">
<input name="开发者_如何学Go" value="register" type="button" class="button" />
</a>
How to fix it?
It's improper. If you want that button to go to signup.php, do so the proper way:
<form method="GET" action="signup.php">
<input type="submit" value="Register">
</form>
Or the javascript method:
<input type="button" value="Register" onclick="window.location='signup.php'" />
If you're going to require it
- To be a button
- To not use another form
Then you'll have to use JavaScript, though it's not preferred for navigation.
<input name="" value="register" type="button" class="button" onclick="document.location='Signup.php'" />
You're probably still best to close the form that the button is within and create the separate form, but I can't say what you're working with or your requirements.
Try this:
<a href="Signup.php" title="Register">Register</a>
Jonathan's answer should be working. The problem might be with the php rather than markup here. If you must keep the anchor tag why don't you just style it to look like your button?
One thing is for sure, an anchor tag wrapping an input tag won't work on IE.
精彩评论