O'Reilly logo

Learning PHP, MySQL, and JavaScript by Robin Nixon

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Test Your Knowledge: Questions

Question 17-1

What JavaScript method can you use to send a form for validation prior to submitting it?

Question 17-2

What JavaScript method is used to match a string against a regular expression?

Question 17-3

Write a regular expression to match any characters that are not in a word, as defined by regular expression syntax.

Question 17-4

Write a regular expression to match either of the words fox or fix.

Question 17-5

Write a regular expression to match any single word followed by any nonword character.

Question 17-6

Using regular expressions, write a JavaScript function to test whether the word fox exists in the string “The quick brown fox”.

Question 17-7

Using regular expressions, write a PHP function to replace all occurrences of the word the in “The cow jumps over the moon” with the word my.

Question 17-8

What HTML keyword is used to precomplete form fields with a value?

See the section Chapter 17 Answers in Appendix A for the answers to these questions.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required