Change line of code to button

Discussion in 'JavaScript' started by chrisj, Aug 12, 2011.

  1. #1
    How can I change the line "Re-record this video" to a button.
    And How can I change it's location on the page? Thanks.


    document.write("<p><a href='index.html?filename="+my_filename+"'>Re-record this video</a><br/><br/>");
    Code (markup):

     
    chrisj, Aug 12, 2011 IP
  2. programmer_best1

    programmer_best1 Well-Known Member

    Messages:
    282
    Likes Received:
    0
    Best Answers:
    1
    Trophy Points:
    133
    #2
    
    document.write("<div id='record'><form action='index.html?filename="+my_filename+"' method='POST'><input type='submit' name='record' value='Re-record this video' id='record_button' /></form></div>");
    
    Code (markup):

    so this codes give you a "div" inside it form with a button.
    to change the location just make a css code for #record div id
    the css code will be something like this
    
    <style>
    #record{
    display:block;
    margin:10px 20px 0px 0px;
    }
    </style>
    
    Code (markup):
    good lucck
     
    programmer_best1, Aug 15, 2011 IP
  3. Andig

    Andig Peon

    Messages:
    325
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    nice share.. tks all
     
    Andig, Aug 16, 2011 IP