HTML
|
What it does?
|
<button type="button">Click
me!</button>
|
Nothing
|
<button type="submit">Click
me!</button>
|
Submits the page to the url set on form tag’s action attribute. Whether it does a get or a post is determined by the method attribute on the form tag.
|
<form action="http://www.google.com/" method="get">
<html>
<head>
<meta name="viewport"
content="width=device-width"
/>
<title>Index</title>
</head>
<body>
<div>
<button onclick="DisplayHello()"
type="button">
Type Button</button>
<br />
<br />
<button type="submit">
Type Submit</button>
</div>
</body>
</html>
<script type="text/javascript">
function DisplayHello() {
alert('Hello');
}
</script>
</form>
No comments:
Post a Comment
Comments will appear once they have been approved by the moderator