|
@@ -0,0 +1,128 @@
|
|
|
+<!DOCTYPE html>
|
|
|
+<html lang="en">
|
|
|
+<head>
|
|
|
+ <meta charset="UTF-8">
|
|
|
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
|
+ <meta http-equiv="X-UA-Compatible" content="ie=edge">
|
|
|
+ <title>Document</title>
|
|
|
+ <style type="text/css">
|
|
|
+ label{
|
|
|
+ display: inline-block;
|
|
|
+ width:80px;
|
|
|
+ margin-top: 15px;
|
|
|
+ }
|
|
|
+ input{
|
|
|
+ margin-top: 15px;
|
|
|
+ }
|
|
|
+ </style>
|
|
|
+</head>
|
|
|
+<body>
|
|
|
+ <select id="citySelect"></select>
|
|
|
+ <form action="#">
|
|
|
+ <div id="myDiv">
|
|
|
+ <label for="name"> Login: </label>
|
|
|
+ <input type="text" name="Name" placeholder="Enter your Login" id="name">
|
|
|
+ <br>
|
|
|
+ <label for="password"> Password: </label>
|
|
|
+ <input type="password" name="password" placeholder="Enter your password" id="password">
|
|
|
+ <br>
|
|
|
+ <!-- button -->
|
|
|
+ <input type="button" name="Login" value="Login" onclick="ClickLogin()">
|
|
|
+ </div>
|
|
|
+ </form>
|
|
|
+ <script type="text/javascript">
|
|
|
+
|
|
|
+ var body={
|
|
|
+ tagName : "body",
|
|
|
+ paired : true,
|
|
|
+ subTags :[
|
|
|
+ {tagName : "div",
|
|
|
+ paired :true,
|
|
|
+ subTags:[
|
|
|
+ {tagName : "span" ,
|
|
|
+ paired : true,
|
|
|
+ text:"Enter a data please:"},
|
|
|
+
|
|
|
+ {tagName : "br",
|
|
|
+ paired : false},
|
|
|
+
|
|
|
+ {tagName : "input",
|
|
|
+ paired : true,
|
|
|
+ attrs:{
|
|
|
+ type:"text",
|
|
|
+ id:"name"}
|
|
|
+ },
|
|
|
+
|
|
|
+ {tagName : "input",
|
|
|
+ paired : true,
|
|
|
+ attrs:{
|
|
|
+ type:"text",
|
|
|
+ id:"surname"}
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ },
|
|
|
+{tagName :"div",
|
|
|
+ paired :true,
|
|
|
+ subTags:[
|
|
|
+ {tagName : "button",
|
|
|
+ paired : true,
|
|
|
+ text:"OK",
|
|
|
+ attrs: {
|
|
|
+ id:"ok"}
|
|
|
+
|
|
|
+ },
|
|
|
+
|
|
|
+ {tagName : "button",
|
|
|
+ paired : true,
|
|
|
+ text:"Cancel",
|
|
|
+ attrs:{
|
|
|
+ id:"cancel"}
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ }
|
|
|
+
|
|
|
+ ]
|
|
|
+}
|
|
|
+
|
|
|
+var notebook = {
|
|
|
+ brand: prompt("Brand of notebook"),
|
|
|
+ type: prompt("type of notebook"),
|
|
|
+ model: prompt("model of notebook"),
|
|
|
+ ram: +prompt("ram of notebook"),
|
|
|
+ size: prompt("size of notebook"),
|
|
|
+ weight: +prompt("weight of notebook"),
|
|
|
+ resolution: {
|
|
|
+ width: +prompt("width resolution"),
|
|
|
+ height: +prompt("height resolution"),
|
|
|
+ },
|
|
|
+};
|
|
|
+
|
|
|
+var phone = {
|
|
|
+ brand: prompt("brand of phone"),
|
|
|
+ model: prompt("model of phone"),
|
|
|
+ ram:+prompt("ram of notebook"),
|
|
|
+ color: prompt("color of phone"),
|
|
|
+};
|
|
|
+
|
|
|
+var person = {
|
|
|
+ name: prompt("name of person"),
|
|
|
+ surname: prompt("surname of person"),
|
|
|
+ married: confirm("married?")
|
|
|
+}
|
|
|
+
|
|
|
+//object links
|
|
|
+person.laptop = notebook;
|
|
|
+person.smartphone = phone;
|
|
|
+notebook.owner = person;
|
|
|
+phone.owner = person;
|
|
|
+//while confirm
|
|
|
+
|
|
|
+while (confirm()!= true) {}
|
|
|
+
|
|
|
+//array fill
|
|
|
+var arr = [];
|
|
|
+
|
|
|
+
|
|
|
+ </script>
|
|
|
+</body>
|
|
|
+</html>
|