How should you develop the form?

DRAG DROP
You are developing a form that captures a user’s email address by using HTML5 and jQuery.
The form must capture the email address and return it as a query string parameter. The query string
parameter must display the @ symbol that is used in the email address.
You need to implement this functionality.
How should you develop the form? (To answer, drag the appropriate code segment to the correct
target or targets in the answer area. Each code segment may be used once, more than once, or not
at all. You may need to drag the split bar between panes or scroll to view content.)

DRAG DROP
You are developing a form that captures a user’s email address by using HTML5 and jQuery.
The form must capture the email address and return it as a query string parameter. The query string
parameter must display the @ symbol that is used in the email address.
You need to implement this functionality.
How should you develop the form? (To answer, drag the appropriate code segment to the correct
target or targets in the answer area. Each code segment may be used once, more than once, or not
at all. You may need to drag the split bar between panes or scroll to view content.)

Answer:

Explanation:

Reference:
http://www.w3schools.com/jquery/ajax_serialize.asp
http://www.w3schools.com/jsref/jsref_encodeuri.asp



Leave a Reply 4

Your email address will not be published. Required fields are marked *


ranga

ranga

The question said it require to display the ‘@’ in the query string.
but when I test the above implementation I would see the following in the query string.

file:///C:/exams/480/url.html?email=xyz%40domain.com

Any comments ?

Mahaha Meeee

Mahaha Meeee

@ ranga if you’re getting %40 it’s because you used decodeURI and not decodeURIComponent

hamza

hamza

encodeURIComponent is for @

Mahfuz

Mahfuz

1st box then 2nd box