导航:首页 > 万维百科 > 网页设计表单例子

网页设计表单例子

发布时间:2020-10-15 21:47:42

1、网页制作中的表单应该如何设计

1、尽量让表单一目了然
用户浏览网站的时候,通常会快速扫视来获取信息,看看网站内容和设计是否对他们的胃口或者符合需求,再决定要如何应对、交互。表单也是一样的道理。一目了然的表单能让用户立刻知道他们需要填写多少信息,以及如何提交表单。
更多平面设计知识,请咨询华南平面设计学校。
2、考虑使用浮动的提示文本
对于是否要在表单的输入框中加入提示文本有很多争论,其中主要的争论围绕在一点上:当用户点击输入框,光标出现准备输入的时候,其中的提示文本并没有自动消失,而需要手动删除之后再才能输入。这就非常尴尬了。
3、使用表单格式掩码
格式掩码能够提醒用户输入的内容的格式,字段的长短大小,对于表单的可用性有明显提升。在用户激活输入框的时候,格式掩码会出现,它会帮助用户格式化输入信息,避免提交的时候出错。格式掩码常见于数字输入的时候。
4、把表单设计得易于输入
你无法确知用户使用的是手机还是电脑在浏览你的网页,输入你的表单,但是它应该对于各种输入设备都足够友好才行。考虑到你的表单可能会是不同类型的键盘输入的,所以你应该根据表单字段属性和检测到的键盘类型,进行适配。
5、选择垂直单列布局
对于用户而言,垂直单列的布局比起多列的布局更容易使用。当用户浏览的时候,只需要向下浏览即可,不用来回翻看,也可以很好的避免填写过程中的遗漏。
6、控制输入内容
尽量使用浏览器的记忆功能和Cookie,调用数据将表单中常见的字段预先填充进去。没有什么比打开表单其中的多数字段已经自动填写进去,更让人兴奋的了。
7、让表单短而美
当你设计表单的时候,总想从用户那儿尽可能多的获取信息,一定要克制住这个冲动!
只在表单中呈现重要信息,让用户尽可能少的填写。如果稍后需要提供更多的信息,可以在其他的地方诸如电子邮件中向用户获取信息。当用户已经完成注册之后,你们后续推送信息、相互沟通、获取信息的机会更多了。
尽量只保留必要的字段供用户填写,不要提供冗余的选项,让表单小而美。

2、请用HTML语言设计一个表单程序

<html>
<head>
<title></title>
<script>
function check() {
f=0;
var choice = document.getElementsByName("choice");
for(var i=0;i<choice.length;i++){
if(choice[i].checked==true){
f++;
}
}
if(f==0){
alert("请选择题目!");
f=0;
return false;
}
document.subname.submit();
}
</script>
</head>
<body>
<form name="subname" action="" method="get" onsubmit="return check();">
<font style="font-size:20px;">自愿答题统计:</font><br>
<font style="font-size:15px;">您可选择右面题目:</font>
<input input name="choice" type="checkbox" checked="true">题目一
<input input name="choice" type="checkbox">题目二<br>
<font style="font-size:15px;">您可选择右面题目:</font>
<input input name="radio" type="radio" checked="true">愿意
<input input name="radio" type="radio">不愿意<br>
<input input name="button1" type="submit" value="发送表单">
<input input name="button2" type="reset" value="重新填写">
</form>
</body>
</html>

3、求设计一个简单的网页 内容 写一个html页面,至少包含一个表格、一个表单; 30行以上; 美观不管

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
<style>
.fontStyle{
color:red;
font-size:18px;
font-weight:bold;
}
</style>
</head>

<body>
<p class="fontStyle">表格</p>
<table cellspacing="0" cellpadding="0" width="500" height="300" border="1">
<tr>
<td>1</td>
<td>2</td>
</tr>
<tr>
<td>2</td>
<td>2</td>
</tr>
<tr>
<td>3</td>
<td>3</td>
</tr>
<tr>
<td>4</td>
<td>4</td>
</tr>
<tr>
<td>5</td>
<td>5</td>
</tr>
<tr>
<td>6</td>
<td>6</td>
</tr>
</table>
<p>----------------------------------------------------------------------------------------------</p>
<form id="form1" name="form1" method="post" action="">
<p class="fontStyle">表单</p>
<p>
<label for="name">姓名:</label>
<input type="text" name="name" id="name" />
</p>
<p>性别:
<input type="radio" name="sex" id="male" value="radio" /><label for="male">男</label>
<input type="radio" name="sex" id="female" value="radio2" /><label for="female">女</label></p>
<p>爱好:
<input type="checkbox" name="music" id="music" /><label for="music">听音乐</label>
<input type="checkbox" name="web" id="web" /><label for="web">上网</label>
<input type="checkbox" name="book" id="book" /><label for="book">看书</label></p>
<p>
<label for="content">简历:</label>
<textarea name="content" id="content" cols="45" rows="5"></textarea>
</p>
</form>
</body>
</html>
把上面的代码放到dw里,运行就好了,如果还不会,我把网页传给你吧!!!

4、网页设计一个最简单的表单提交!

你直接搜索当地可以提交这个表单的电话问下就OK啦

5、网页制作 form什么意思

表单标签:
form 空白表单
input type="text" 文本域
input type="checkbox" 复选框
input type="radio" 单选框
input type="submit" 提交按钮
input type="hidden" 隐藏域
textarea 文本区域
select 列表

6、HTML5网页前端设计中如下图表单的代码怎么写?

下面是表单代码,你直接再加属性就可以了,表单用 table 写比较简单,div 太麻烦了;
<html xmlns=" http://www.dayinmandarin.com ">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>黑板</title>
</head>
<body>
<div style="width:500px;">
<h1 style="width:500px;height:50px;color:#2A8DF0;border-bottom:#2A8DF0 solid 3px; text-align:center;">用户注册页面</h1>
<table cellpadding="0" cellspacing="10" style="margin:0 auto;">
<tr>
<td align="right" valign="top"><div>用户名:</div></td>
<td><input style='width:250px' value='请输入用户名' /></td>
</tr>
<tr>
<td align="right" valign="top"><div>密 码:</div></td>
<td><input style='width:250px' value='请输入密码' /></td>
</tr>
<tr>
<td align="right" valign="top"><div>确 认:</div></td>
<td><input style='width:250px' value='请再次输入密码' /></td>
</tr>
<tr>
<td align="right" valign="top"><div>姓 名:</div></td>
<td><input style='width:250px' value='请输入真实姓名' /></td>
</tr>
<tr>
<td align="right" valign="top"><div>邮 箱:</div></td>
<td><input style='width:250px' value='请输入电子邮箱' /></td>
</tr>
</table>
<div align="center"><input style="width:100px;height:30px;text-align:center;line-height:30px;background:#2289F0;border:#2289F0;color:white;font-weight:bold;font-size:16px;" type="submit" value="提交注册" /></div>
</div>
</body>
</html>

7、网页设计中的表格!

<tr>
<td height="890" background="imega/2.gif" valign="top">
<table width="102%" height="25" border="0" cellpadding="5" cellspacing="1"> <!--这个表格已经至顶 -->
<tr>
<td width="11%"> </td>
<td width="17%" valign="top">|<a href="i.jsp">111</a></td>
<td width="30%" valign="top" >这一段表格至顶</td>
<td width="42%"> </td>
</tr>
</table>
</td>
</tr>

8、求以下网页设计表格html代码

代码(大小有需要可以调):

<!DOCTYPE html>
<html>

    <head>
        <meta charset="utf-8">
        <title>练习使用HTML</title>
    </head>

    <body>
        <center>
            <table border="1px" cellpadding="0px" cellspacing="0px">
                <tr>
                    <td colspan="4" height="60px"></td>
                </tr>
                <tr>
                    <td width="200px" height="60px"></td>
                    <td width="200px" height="60px"></td>
                    <td width="200px" height="60px"></td>
                    <td width="200px" height="60px"></td>
                </tr>
                <tr>
                    <td colspan="4" height="60px"></td>
                </tr>
                <tr>
                    <td colspan="4" height="60px"></td>
                </tr>
                <tr>
                    <td colspan="4" height="60px"></td>
                </tr>
                <tr>
                    <td colspan="4" height="60px"></td>
                </tr>
            </table>
        </center>
    </body>

</html>

运行效果:

9、网页设计表单~一道题

这边是HTML
<form action="">
<label for="userName">用户名:</label><input type="text" id="userName">
<label for="userName">密 码:</label><input type="text" id="pwd">
<input type="button" value="点击这边" id="btn">
</form>

这边是JS
var userName = document.getElementById('userName'),
pwd = document.getElementById('pwd'),
button = document.getElementById('btn');
btn.onclick = function(){
console.log(1);
if (userName.value == "" || userName.value== " ") {
alert("用户名为空");
}else if (pwd.value == "" || pwd.value == " ") {
alert("密码为空");
}else {
alert("登入成功");
}
}

与网页设计表单例子相关的知识