社区
ASP
帖子详情
怎样用
实现form的reset功能啊?
spoky
2003-08-21 12:17:18
我这样写,可是每一次它都变成提交功能
<input type="image" name="Submit" src="reset.gif" onclick="reset">
<input type="image" name="Submit2" src="submit.gif" onclick="submit">
...全文
353
6
打赏
收藏
怎样用<input type="image"..>实现form的reset功能啊?
我这样写,可是每一次它都变成提交功能
复制链接
扫一扫
分享
转发到动态
举报
写回复
配置赞助广告
用AI写文章
6 条
回复
切换为时间正序
请发表友善的回复…
发表回复
打赏红包
fason
2003-08-21
打赏
举报
回复
<img/>没有type="image"
style="cursor:hand"
ceocio
2003-08-21
打赏
举报
回复
<img src="xxx.gif" onClick="javascript:form1.reset()" alt="重置">
spoky
2003-08-21
打赏
举报
回复
还有就是下面这个图片,我想让鼠标经过它时显示手形图标,应该怎么写呢?谢谢
<img type="image" name="Button" src="change.gif" onclick="setid();" >
fason
2003-08-21
打赏
举报
回复
<input type="image" name="Submit" src="reset.gif" onclick="reset();return(false)">
type="image"本来就有提交的功能,onclick="submit"去掉
ttt2
2003-08-21
打赏
举报
回复
<img src="a.gif" onclick="document.form1.reset()">
jerrycool
2003-08-21
打赏
举报
回复
请问楼上阿信,能成吗??
综合一下:
<img src="*.gif" onClick="javascript:form1.reset()" alt="重置"style="cursor:hand">
jsp网络留言板程序
jsp做的一个网络留言板程序
<
form
name="
form
" method="post" action="talkAction.do?method=insertTalk" onSubmit="return checkEmpty(
form
)">
留言主题
<
input
name="topic"
type
="text" size="40">
留 言 人
<
input
name="who"
type
="text" size="40">
留言内容
<
input
type
="submit" name="Submit" value="发表留言"> <
input
type
="
reset
" name="Submit2" value="重置">
form
>
JQuery选择器
JQuery选择器 几个小练习 TYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2-12
<script src="scripts/jquery-1.5.1.min.js"
type
="text/javascript">type="text/javascript"> //form1 :text"); var $allpassword= $("#
form
1 :password"); var $allradio= $("#
form
1 :radio"); var $allcheckbox= $("#
form
1 :checkbox"); var $allsubmit= $("#
form
1 :submit"); var $all
image
= $("#
form
1 :
image
"); var $all
reset
= $("#
form
1 :
reset
"); var $allbutton= $("#
form
1 :button"); // <
input
type
=button /> 和
都可以匹配 var $allfile= $("#
form
1 :file"); var $allhidden= $("#
form
1 :hidden"); // <
input
type
="hidden" />和
test
都可以匹配. var $allselect = $("#
form
1 select"); var $alltextarea = $("#
form
1 textarea"); var $All
Input
s = $("#
form
1 :
input
"); var $
input
s = $("#
form
1
input
"); $("div").append(" 有" + $alltext.length + " 个( :text 元素)
") .append(" 有" + $allpassword.length + " 个( :password 元素)
") .append(" 有" + $allradio.length + " 个( :radio 元素)
") .append(" 有" + $allcheckbox.length + " 个( :checkbox 元素)
") .append(" 有" + $allsubmit.length + " 个( :submit 元素)
") .append(" 有" + $all
image
.length + " 个( :
image
元素)
") .append(" 有" + $all
reset
.length + " 个( :
reset
元素)
") .append(" 有" + $allbutton.length + " 个( :button 元素)
") .append(" 有" + $allfile.length + " 个( :file 元素)
") .append(" 有" + $allhidden.length + " 个( :hidden 元素)
") .append(" 有" + $allselect.length + " 个( select 元素)
") .append(" 有" + $alltextarea.length + " 个( textarea 元素)
") .append(" 表单有 " + $
input
s.length + " 个(
input
)元素。
") .append(" 总共有 " + $All
Input
s.length + " 个(:
input
)元素。
") .css("color", "red") $("
form
").submit(function () { return false; }); // return false;不能提交.*/ }); //]]> <
form
id="
form
1" action="#"> <
input
type
="button" value="Button"/>
<
input
type
="checkbox" name="c"/>1<
input
type
="checkbox" name="c"/>2<
input
type
="checkbox" name="c"/>3
<
input
type
="file" />
<
input
type
="hidden" />
test
<
input
type
="
image
" />
<
input
type
="password" />
<
input
type
="radio" name="a"/>1<
input
type
="radio" name="a"/>2
<
input
type
="
reset
" />
<
input
type
="submit" value="提交"/>
<
input
type
="text" />
Option
Button
form
>
关于
form
表单的灵活运用
input
type
="password" name="" value="1234">这样你就会得到一个自带初始值的密码框。如:<
input
type
="text" name="username" value="两年半的练习生" readonly>如:<
input
type
="radio" name="radio" checked>男。如:<
input
type
="radio" name="radio">男。<
input
type
="radio" name="radio">女。
HTML
input
type
=file文件 选择表单元素 图片上传等等
一、-
input
type
=file与文件上传 本文所说的
input
type
=file指的是
type
类型是file的
input
元素,最简HTML代码如下: <
input
type
=file> 但是,为了习惯,我们多写成: <
input
type
="file"> 在HTML5出现之前(XHTML),我们的闭合规则则有些出入: <
input
type
="file"...
HTML 5 <
input
>
type
属性
http://www.w3school.com.cn/html5/att_
input
_
type
.asp 实例 带有不同输入类型的表单: First name:
type
="text" name="fname" /> Last name:
type
="text" name="lname" />
type
="submit" value="Submit" />
ASP
28,390
社区成员
357,068
社区内容
发帖
与我相关
我的任务
ASP
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
复制链接
扫一扫
分享
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
加入社区
获取链接或二维码
近7日
近30日
至今
加载中
查看更多榜单
社区公告
暂无公告
试试用AI创作助手写篇文章吧
+ 用AI写文章