Results 1 to 5 of 5
  1. #1

    Default SIMPLE JAVASCRIPT (tabang mga master)


    good day ninyo tanan,

    naa mi assignment sa school, pero naglibog ko kay ang iyang output cge lng ug "CORRECT". di jud mo display ang "WRONG PASSWORD" maski nag gamit nako ug IF ELSE IF....unsay prob ani mga master? salamat ninyo tanan

    mao ni ang codes:

    <html>
    <title>form</title>
    <head>
    <script type="text/javascript">
    function redirect()
    {
    var a
    if(a="ken")
    {
    alert("password correct")
    }
    else
    {
    alert("wrong password")
    }
    }
    </script>
    </head>
    <body>
    <form>
    Enter Password<input type="password" value="">
    <input type="button" value="submit" onclick="redirect()">
    </form>
    </body>
    </html>

  2. #2
    <html>
    <title>form</title>
    <head>
    <script type="text/javascript">
    function redirect()
    {
    var a = document.getElementById("your-password-field-id").value;
    if(a=="ken")
    {
    alert("password correct")
    }
    else
    {
    alert("wrong password")
    }
    }
    </script>
    </head>
    <body>
    <form>
    Enter Password<input type="password" id="your-password-field-id" value=""/>
    <input type="button" value="submit" onclick="redirect();"/>
    </form>
    </body>
    </html>

    you should specify the ID.... of your password field...

  3. #3
    thanks boss.... but akong gisuwayan, mao lage gihapon. if mag type ko ug sayop nga password dapat moingon unta ug "WRONG PASSWORD"

    ang problema ani ron kay maski unsa imong e type mag cge lng ug "PASSWORD CORRECT"

    please help mga master matzalamss ninyo daan

  4. #4
    aw nakuha na boss pero if ensakto ang pagka type sa password kay dili mo display ang "CORRECT PASSWORD"

    sensya namo mga master.... studyante pa intawn hehe

  5. #5
    <html>
    <title>form</title>
    <head>
    <script type="text/javascript">
    function redirect()
    {
    var a = document.getElementById("password").value;

    if(a == 'ken')
    {
    alert("Password Correct");
    }
    else
    {
    alert("Wrong Password");
    }
    }
    </script>
    </head>
    <body>
    <form>
    Enter Password<input type="password" id="password" value=""/>
    <input type="button" value="submit" onclick="redirect();"/>
    </form>
    </body>
    </html>

    Try na if dili gani try og add og alert ("a =>" +a); after sa pag initialize nmo sa variable nga a. then i check og unsay mo display.

  6.    Advertisement

Similar Threads

 
  1. tabang mga master Unlocking Globe Huawei e357
    By Sim Thirdy in forum Networking & Internet
    Replies: 2
    Last Post: 05-12-2013, 11:46 PM
  2. Tabang mga master dha nga banggiiitan,,,,,
    By 3D_tech in forum Computer Hardware
    Replies: 33
    Last Post: 01-22-2013, 12:07 AM
  3. Replies: 135
    Last Post: 08-24-2012, 04:22 PM
  4. Router? o Modem?..pa tabang mga master please
    By ISBUK in forum Networking & Internet
    Replies: 9
    Last Post: 04-26-2011, 06:04 PM
  5. Ngayo unta kog tabang mga Master
    By deathtrancer in forum Networking & Internet
    Replies: 4
    Last Post: 07-27-2008, 02:38 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
about us
We are the first Cebu Online Media.

iSTORYA.NET is Cebu's Biggest, Southern Philippines' Most Active, and the Philippines' Strongest Online Community!
follow us
#top