I need help on JavaScript and HTML coding

Discussion in 'HTML & Website Design' started by Saehwo, Mar 14, 2015.

  1. #1
    My goal is this:
    When the user opens the page, he will see:
    Sample1_BeforeUse.PNG

    When he enters "data" he will see:
    Sample1_AfterUse.PNG
    I need a function that does that ^

    Here's the code:
    <html>
    <head>
    <script language="Javascript">
    
    
    function Answer(){
    var answer=document.project.answer.value;
    var search=document.myProject.search.value;
    
    if(answer=="d") ;
    
    }
    
    
    
    
    
    
    
    </script>
    
    </head>
    <body>
    
    <!--First Form-->
    <form name="project">
    <INPUT TYPE="text" NAME="answer" SIZE="30" MAXLENGTH="6">
    
    <INPUT TYPE="button" VALUE=" SUBMIT " onClick="Answer()">
    
    </form>
    
    
    <!--Second Form-->
    <form name="myProject">
    <tr>
    <td><input type="text" name="search" size="1" value="d" readonly=true></td>
    <td><input type="text" name="search1" size="1" value="a" readonly=true></td>
    <td><input type="text" name="search2" size="1" value="t" readonly=true></td>
    <td><input type="text" name="search3" size="1" value="a" readonly=true></td>
    </tr>
    </form>
    
    </body>
    </html>
    Code (markup):
     
    Saehwo, Mar 14, 2015 IP
  2. Saehwo

    Saehwo Greenhorn

    Messages:
    3
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    21
    #2
    /Solved
     
    Saehwo, Mar 15, 2015 IP