button 태그
type
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8"/>
<title>test</title>
</head>
<body>
<form>
<input type="text" name="txt1" />
<button type="button">Button</button>
<button type="reset">Reset Button</button>
<button type="submit">Submit Button</button>
</form>
</body>
</html>
image button
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8"/>
<title>test</title>
</head>
<body>
<form>
<button type="button">
<img src="https://www.w3schools.com/images/compatible_chrome.gif" />
</button>
</form>
</body>
</html>
name, value
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8"/>
<title>test</title>
</head>
<body>
<form action="/formtest3.html" method="get">
Choose your favorite subject:
<button name="subject" type="submit" value="HTML">HTML</button>
<button name="subject" type="submit" value="CSS">CSS</button>
</form>
</body>
</html>
disabled
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8"/>
<title>test</title>
</head>
<body>
<form>
<button type="button" disabled>Button</button>
</form>
</body>
</html>
autofocus
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8"/>
<title>test</title>
</head>
<body>
<form>
<button type="button" autofocus>Button</button>
</form>
</body>
</html>
formaction
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8"/>
<title>test</title>
</head>
<body>
<form action="/formtest3.html" method="get">
<input type="text" name="txt1" /><br>
<button type="submit">Submit</button><br>
<button type="submit" formaction="/hrtest.html">Button</button>
</form>
</body>
</html>
formenctype
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8"/>
<title>test</title>
</head>
<body>
<form action="/formtest3.html" method="post" enctype="application/x-www-form-urlencoded">
<input type="text" name="txt1" /><br>
<button type="submit">Submit</button><br>
<button type="submit" formenctype="text/plain">Button</button>
</form>
</body>
</html>
formnovalidate
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8"/>
<title>test</title>
</head>
<body>
<form action="/formtest3.html" method="get">
<input type="email" name="txt1" /><br>
<button type="submit">Submit</button><br>
<button type="submit" formnovalidate>Button</button>
</form>
</body>
</html>
formtarget
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8"/>
<title>test</title>
</head>
<body>
<form action="/formtest3.html" method="get" target="_blank">
<input type="email" name="txt1" /><br>
<button type="submit">Submit</button><br>
<button type="submit" formtarget="_self">Button</button>
</form>
</body>
</html>