Creating DIV Tag

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Raju.saripalli

    Creating DIV Tag

    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, insertAdjacentH TML.

    Box(BoxCount, width, height, left, top)
    myBox.moveBox(l eft, 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(3 00, 200)

    Example HTML:
    <body>
    <input type='button' value='Add new box' >
    <input type='button' value='Move new box' >
    </body>
    <script>
    // your code here
    </script>

  • webbugtrack@gmail.com

    #2
    Re: Creating DIV Tag

    Let me guess, this is your homework?

    Most forums will not assist you unless you make an effort to solve it
    yourself first.

    If you have a specific question, ask away.

    Comment

    Working...