YouaredevelopingaWebpage.Theusertypesacreditcardnumberintoaninputcontrolnamedccandclicksabuttonnamedsubmit.Thesubmitbuttonsendsthecreditcardnumbertotheserver.AJavaScriptlibraryincludesaCheckCreditCardfunctionthatreturnsavalueoftrueifthecreditcardappearstobevalid,basedonitschecksum.Youneedtoensurethattheformcannotbeusedtosubmitinvalidcreditcardnumberstotheserver.Whatshouldyoudo?()A.Configuretheinputcontroltorunontheserver.Onthesubmitbutton,addaserver-sideOnClickhandlerthatcallsCheckCreditCard and rejects the form submissioniftheinputisinvalid.B.Ontheinputcontrol,addanonChangehandlerthatcallsCheckCreditCardandcancelstheformsubmissionwhenthe input is invalid.C.Configuretheinputcontrolandthesubmitbuttontorunontheserver.Addasubmit_OnClickhandlerthatcallsCheckCreditCard and rejects the form submission if theinputisinvalid.D.Ontheform,addanonSubmithandlerthatcallsCheckCreditCardandcancelstheformsubmissioniftheinput is invalid.
YouaredevelopingaWebpage.Theusertypesacreditcardnumberintoaninputcontrolnamedccandclicksabuttonnamedsubmit.Thesubmitbuttonsendsthecreditcardnumbertotheserver.AJavaScriptlibraryincludesaCheckCreditCardfunctionthatreturnsavalueoftrueifthecreditcardappearstobevalid,basedonitschecksum.Youneedtoensurethattheformcannotbeusedtosubmitinvalidcreditcardnumberstotheserver.Whatshouldyoudo?()
A.Configuretheinputcontroltorunontheserver.Onthesubmitbutton,addaserver-sideOnClickhandlerthatcallsCheckCreditCard and rejects the form submissioniftheinputisinvalid.
B.Ontheinputcontrol,addanonChangehandlerthatcallsCheckCreditCardandcancelstheformsubmissionwhenthe input is invalid.
C.Configuretheinputcontrolandthesubmitbuttontorunontheserver.Addasubmit_OnClickhandlerthatcallsCheckCreditCard and rejects the form submission if theinputisinvalid.
D.Ontheform,addanonSubmithandlerthatcallsCheckCreditCardandcancelstheformsubmissioniftheinput is invalid.