990823-3

When a user connects to a search engine on the web, and fills in a search query, the string sent to the search engine might be

http://www.euroseek.net/query?query=tropical+flowers&lang=en

What HTML code caused this string to be sent? Vilken HTML-kod orsakade att denna sträng sändes?

Answer

Solution 1:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML><HEAD>
</HEAD><BODY>

<FORM ACTION="http://www.euroseek.net/query" METHOD=get NAME="searchform">

<INPUT TYPE="TEXT" NAME="query"><br>

Limit to Language:&nbsp;
<SELECT NAME="lang" SIZE=1>
<OPTION VALUE="wo" selected>Any
<OPTION VALUE="sv">Svenska
</SELECT>

<input type="submit">

</FORM>
</BODY></HTML>

Solution 2, same as solution 1 but replace <SELECT> with:

<input type="radio" name="lang" value="en">English
<input type="radio" name="lang" value="sv">Swedish

Solution 3, same as solution 1 but replace <SELECT> with:

<input type="text" name="lang">

This solution is not so neat, since how should the user know that English is specified as "en" and not as "English"?

List of exam questions