Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Question1: Read the following chunk of code and answer at the end inprecise mann

ID: 3616283 • Letter: Q

Question

Question1:

Read the following chunk of code and answer at the end inprecise manner; for your verification you may add some necessaryTags so that code can be executed on your side. We requireonly stated justification in the given format at end.

…………………………………………..

…………………………………………..

…………………………………………….

<SCRIPT>

function AnonymousCheck() {

if((document.Myform.a.value == 'CS101'||document.Myform.a.value== 'cs101')&&

(document.Myform.pass.value == '101'||document.Myform.pass.value=='vu'))

{

window.alert(" You are allowed to take paper." ) ;

document.form1.a.onBlur();

}

else

{    window.alert(" You are notallowed to take paper." ) ;

      document.form1.a.OnBlur();

}

}

function AnonymousCheck1() {

if(document.Myform.a.value == ''||document.Myform.a.value !='cs101'||document.Myform.a.value != 'CS101'

||document.Myform.pass.value =='')

{

window.alert("Please check entered course is irrelevant orPassword field is empty" ) ;

document.form1.a.onBlur();

}}

</SCRIPT>

……………………………

…………………………..

<FORM name="Myform" method="post" action="">

<TABLE border="1">

    <TR> <TD>Paper</TD>

      <TD><INPUT type="text"name="a" onBlur="AnonymousCheck1 ()">

       </TD></TR><TR> <TD>Password</TD>

       <TD><INPUTtype="password"name="pass"onBlur="AnonymousCheck()"></TD>

    </TR><TR> <TD><INPUTtype="reset" name = "Reset" value="Reset"></TD>

      <TD><INPUT type="submit"name = "ok" value="Verify" ></TD></TR>

</TABLE>

</FORM>

……………………………

Statements

What Required

Answer Column

If(document.Myform.a.value == 'CS101 AND <INPUTtype="text" name="a" …

What    change will occur if we altername=”a” to name =”ab”

if((document.Myform.a.value =='CS101'||document.Myform.a.value == 'cs101')&&

(document.Myform.pass.value =='101'||document.Myform.pass.value =='vu'))

When the statement will become true.

function AnonymousCheck1()

When this function will be executed

onBlur="AnonymousCheck()

What is onBlur role here?

                         Over all theme of the code

Statements

What Required

Answer Column

If(document.Myform.a.value == 'CS101 AND <INPUTtype="text" name="a" …

What    change will occur if we altername=”a” to name =”ab”

if((document.Myform.a.value =='CS101'||document.Myform.a.value == 'cs101')&&

(document.Myform.pass.value =='101'||document.Myform.pass.value =='vu'))

When the statement will become true.

function AnonymousCheck1()

When this function will be executed

onBlur="AnonymousCheck()

What is onBlur role here?

                         Over all theme of the code

Explanation / Answer

<HTML>

           <TITLE>ASSIGNMENT SOLUTION</TITLE>

<HEAD>

<SCRIPT>

           function AnonymousCheck()

           {

                        if((document.Myform.a.value =='CS101'||document.Myform.a.value =='cs101')&&(document.Myform.pass.value =='101'||document.Myform.pass.value =='vu'))

                        {

                                 window.alert(" You are allowed to take paper." ) ;

                                 document.form1.a.onBlur();

                        }

                        else

                        {   

                                   window.alert(" You are not allowed to take paper." ) ;

                                  document.form1.a.OnBlur();

                       }

           }//end of Anonymouscheck()

           function AnonymousCheck1()

           {

                       if(document.Myform.a.value == ''||document.Myform.a.value !='cs101'||document.Myform.a.value !='CS101'||document.Myform.pass.value =='')

                       {

                                    window.alert("Please check entered course is irrelevant orPassword field is empty" ) ;

                                    document.form1.a.onBlur();

                       }

           }//end of anonymouscheck1()

</SCRIPT>

</HEAD>

<BODY>

<FORM name="Myform" method="post" action="">

<TABLE border="1">

    <TR> <TD>Paper</TD>

      <TD><INPUT type="text"name="a">

       </TD></TR><TR> <TD>Password</TD>

       <TD><INPUTtype="password"name="pass"onBlur="AnonymousCheck()"></TD>

    </TR><TR> <TD><INPUTtype="reset" name = "Reset" value="Reset"></TD>

      <TD><INPUT type="submit"name = "ok" value="Verify" ></TD></TR>

</TABLE>

</FORM>

</BODY>

</HTML>

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote