多做题,通过考试没问题!

微软认证考试

睦霖题库>其他计算机考试>微软认证考试

You are developing a Web page. The user types a credit card number into an input control named cc and clicks a button named submit. The submit button sends the credit card number to the server. A JavaScript library includes a CheckCreditCard function that returns a value of true if the credit card appears to be valid, based on its checksum. You need to ensure that the form cannot be used to submit invalid credit card numbers to the server. What should you do?()

  • A、Configure the input control to run on the server. On the submit button, add a server-side OnClick handler that calls CheckCreditCard  and  rejects  the form submission if the input is invalid.
  • B、On the input control,add an onChange handler that calls CheckCreditCard and cancels the form submission when the  input  is invalid.
  • C、Configure the input control and the submit button to run on the server. Add a submit_OnClick handler that calls CheckCreditCard  and  rejects  the  form  submission  if  the input is invalid.
  • D、On the form, add an onSubmit handler that calls CheckCreditCard and cancels the form submission if the input  is invalid.
正确答案:D
答案解析:
进入题库查看解析

微信扫一扫手机做题