Create Javascript object Box and move it
Object Box should create new HTML elements DIV on page.
Quantity of Boxes on the page is unlimited.
DIV should have:
1. absolute position;
2. background color: red;
3. padding 20px;
Do not use document.write, innerHTML, insertAdjacentHTML.
Box(BoxCount, width, height, left, top)
myBox.moveBox(left, top)
BoxCount - text inside of DIV, counting Box number ("Box: " + i)
width, height - size of DIV
left, right - position of DIV on page
All boxes can have the same size, position and move to the same
position.
Important: Size of Boxes on monitor screen should be
the same in Internet Explorer and Mozilla Firefox.
---------------------
Example javascript:
var myBox = new Box("Count: " + i, 80, 60, 100, 100);
myBox.moveBox(300, 200)
Example HTML:
<body>
<input type='button' value='Add new box' >
<input type='button' value='Move new box' >
</body>
<script>
// your code here
</script>