-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path4.htm
35 lines (35 loc) · 887 Bytes
/
4.htm
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
<!DOCTYPE html>
<html>
<head>
<script src="4.js" type="text/javascript">
</script>
</head>
<body>
<div id="node"></div>
<script type="text/javascript">
formData1 =
[
{"name": "Name", "type": "text" },
{"name": "Fave books", "type": "list", "list":
[
{"name": "Best book", "type": "text" },
{"name": "Next best book", "type": "text" }
]
},
{"name": "Awake", "type": "radio", "values": ["yes", "no"] }
];
formData2 =
[
{"name": "Date", "type": "date" },
{"name": "Emergencies", "type": "list", "list":
[
{"name": "Out of games", "type": "radio", "values": ["yes", "no"] },
{"name": "Out of beer", "type": "radio", "values": ["wait", "what"] }
]
}
];
parseObjectToForm(formData1, document.getElementById('node'));
parseObjectToForm(formData2, document.getElementById('node'));
</script>
</body>
</html>