1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
|
@using (Html.BeginForm("Entry", "Home", FormMethod.Post))
{
@Html.Label("Name", "Name")
@Html.TextBox("Name", "John", new { @required = "required" })
<br />
@Html.Label("Email", "Email")
@Html.TextBox("Email", "john@example.com", new { @type = "email", @multiple = "multiple", @minlength = 3, @maxlength = 128, @pattern = ".+@example.com", @title = "example.com のメールアドレスを入力します。" })
<fieldset>
<legend>Animals:</legend>
@Html.TextBox("Animal-Item-1", "true", new { @type = "checkbox", @id = "Animal-Item-1", @value = "Bird", @checked = "checked" })
@Html.Label("Animal-Item-1", "Bird")
@Html.CheckBox("Dog", true, new { @id = "Animal-Item-2" })
@Html.Label("Animal-Item-2", "Dog")
@Html.CheckBox("Cat", true, new { @id = "Animal-Item-3" })
@Html.Label("Animal-Item-3", "Cat")
</fieldset>
@Html.Label("File", "File")
@Html.TextBox("File", "", new { @type = "file" })
<br />
@Html.Label("Number", "Number")
@Html.TextBox("Number", "100", new { @type = "number", @step = "10" })
<br />
@Html.Label("Password1", "Password1 (10 charcaters minimum)")
@Html.TextBox("Password1", "", new { @type = "password", @required = "required", @minlength = 12, @maxlength = 32, @placeholder = "password1" })
<br />
@Html.Label("Password2", "Password2 (12 charcaters minimum)")
@Html.Password("Password2", "", new { @type = "password", @required = "required", @minlength = 12, @maxlength = 32, @placeholder = "password2" })
<br />
<fieldset>
<legend>Device:</legend>
@Html.TextBox("Device", "None", new { @type = "radio", @id = "Device-Value-1", @checked = true })
@Html.Label("Device", "None")
<br />
@Html.TextBox("Device", "MacBook Air", new { @type = "radio", @id = "Device-Value-1" })
@Html.Label("Device", "MacBook Air")
<br />
@Html.TextBox("Device", "MacBook Pro", new { @type = "radio", @id = "Device-Value-2" })
@Html.Label("Device", "MacBook Pro")
<br />
@Html.TextBox("Device", "Mac mini", new { @type = "radio", @id = "Device-Value-3" })
@Html.Label("Device", "Mac mini")
<br />
@Html.TextBox("Device", "iMac", new { @type = "radio", @id = "Device-Value-4" })
@Html.Label("Device", "iMac")
<br />
@Html.TextBox("Device", "iMac Pro", new { type = "radio", id = "Device-Value-5" })
@Html.Label("Device", "iMac Pro")
<br />
@Html.TextBox("Device", "Mac Pro", new { type = "radio", id = "Device-Value-6" })
@Html.Label("Device", "Mac Pro")
</fieldset>
<fieldset>
<legend>Web Browser:</legend>
@Html.RadioButton("WebBrowser", "Edge", true, new { @id = "WebBrowser-Value-1" })
@Html.Label("WebBrowser", "Edge")
<br />
@Html.RadioButton("WebBrowser", "Safari", new { @id = "WebBrowser-Value-2" })
@Html.Label("WebBrowser", "Safari")
</fieldset>
@Html.Label("PhoneNumber", "Phone number")
@Html.TextBox("PhoneNumber", "000-0000-0000", new { @type = "tel", @minlength = 3, @maxlength = 128, @pattern = "[0-9]{3}-[0-9]{3}-[0-9]{4}" })
<br />
@Html.TextBox("item-8", "Button", new { @type = "button" })
<br />
@Html.TextBox("Submit", "Send", new { @type = "submit" })
<br />
@Html.TextBox("Reset", "Reset", new { @type = "reset" })
<br />
@Html.TextBox("Hidden-Item-1", "Hidden-Value-1", new { @type = "hidden" })
@Html.Hidden("Hidden-Item-2", "Hidden-Value-2")
}
|