同步操作将从 JoyPoint/StudyStudio 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
// forms_check.js// A function tst_phone_num is defined and tested.// This function checks the validity of phone// number input from a form// Function tst_phone_num// Parameter: A string// Result: Returns true if the parameter has the form of a valid// seven-digit phone number (3 digits, a dash, 4 digits)function tst_phone_num(num) {// Use a simple pattern to check the number of digits and the dashvar ok = num.search(/^\d{3}-\d{4}$/);if (ok == 0)return true;elsereturn false;} // end of function tst_phone_num// A script to test tst_phone_numvar tst = tst_phone_num("444-5432");if (tst)document.write("444-5432 is a valid phone number <br />");elsedocument.write("Program error <br />");tst = tst_phone_num("444-r432");if (tst)document.write("Program error <br />");elsedocument.write("444-r432 is not a valid phone number <br />");tst = tst_phone_num("44-1234");if (tst)document.write("Program error <br />");elsedocument.write("44-1234 is not a valid phone number <br /");
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。