习题
1. HTML中,<form method=post>method表示(  A  )
A. 提交的方式
B. 表单所用的脚本语言
C. 提交的URL地址
D. 表单的形式
2. 增加表单的文本域的HTML代码是(  B  )
A. <input type=submit></input>
B. <textarea name="textarea"></textarea>
C. <input type=radio></input>
D. <input type=checkbox></input>
3. 以下关于<select>标记说法正确的是(  A D E  )
A. <select>定义的表单元素在一个下拉菜单中显示选项
B. rowscols属性可以定义其大小
C. <select>定义的表单元素是一个单选按钮
D. <select>定义的表单元素通过改变其multiple属性取值可以实现多选
E. 一般情况下,<select>定义的表单元素以一个下拉列表形式出现
4. 现要设计一个可以输入地址的web页,应该使用的语句是(B    )
A. <input type=radio>
B. <input type=text>
C. <input type=password>
D. <input type=checkbox>
5. <form>标记中,_____ action ____属性的作用就是指出该表单所对应的处理程序的位置;______ method ___属性用于指定该表单的运行方式。
6. method属性的取值可以为_____ get ____和___post______之一,其默认方式是__get_______。
7. <input>标记中,____name_____属性的值是相应处理程序中的变量名;___type__属性用于指出用户输入值的类型。
8. <input>标记中,type属性有九种取值,分别是:textsubmitresetpasswordcheckboxradioimagehiddenfile
9. 当type=text时,<input>标记除了有两个不可默认的属性____name_____和_____type____外,还有三个可选的属性:___maxlength______、__size_______和_____value____。
10.当type=____image_____时,浏览器会在相应位置产生一个图像按钮,其中,___src______属性是必需的,它用于设置图像文件的路径。
实验参考程序
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
    <title>留言</title>
    <meta content="留言" name="keywords">
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>
<body>
    <table height="18" cellspacing="0" cellpadding="0" width="532" align="center" border="0">
        <tbody>
            <tr>
                <td valign="top" align="middle" height="18">
                    <table class="unnamed1" width="536" align="center" border="0">
                        <tbody>
                            <tr>
                                <td width="195">
                                    <a href="">
                                        <img height="20" src="留 言.files/wylysy.jpg" width="70" border="0"></a>  
                                    <a href="">
                                        <img height="20" src="留 言.files/wyly.jpg" width="70" border="0"></a>
                                </td>
                            </tr>
                        </tbody>
                    </table>
                    <table class="unnamed1" cellspacing="1" cellpadding="4" width="532" align="center"
                        border="0">
                        <form name="form" action="index.asp" method="post">
                        <tbody>
                            <tr>
                                <td align="middle" colspan="2" height="25">
                                    <div align="center">
                                        <font size="3"><strong>留言</strong></font><font color="#000000"> </font>
                                    </div>
                                    <img height="1" src="" width="500">
                                </td>
                            </tr>
                            <tr>
                                <td width="75">
                                    <div align="right">
                                        姓名:</div>
                                </td>
                                <td width="256">
                                    <input class="input1" maxlength="10" name="name">
                                    *10个字内
                                </td>
                            </tr>
                            <tr>
                                <td align="right">
                                    性别:
                                </td>
                                <td>
                                    <select onchange="showimage()" size="1" name="sex">
                                        <option textarea中cols表示value="1" selected></option>
                                        <option value="0"></option>
                                    </select>
                                </td>
                            </tr>
                            <tr>
                                <td align="right">
                                    QQ
                                </td>
                                <td>
                                    <input class="input1" id="qq" maxlength="25" size="35" name="qq">