HTML提交按钮的问题?

HTML提交按钮的问题?,第1张

<!-- method代表接受方式 post/get

form action 属性规定当提交表单时,向何处发送表单数据。 -->

<form action="#" method="post"/>

<!--label复选框的光标方便用户选中,可加可不加。 -->

<label for="user">名字:</label><input type = "text" id="user" name="user" size="15" value="请写上你的用户名" maxlength="15"/></br>

<label for="title">标题:</label><input type = "text" id="title" name="title" size="25" value="请输入标题" maxlength="25"/></br>

<label for="content">内容:</label></br><textarea id="content" name="content" rows="9" cols="35" value="please" wrap="off"/></textarea></br>

<input type="submit" id="submit" name="submit" value="发布" />

<input type="submit" value="提交" style="width:80pxheight:100pxcolor:redbackground-color:#3FF">

type:只有当type的设置等于submit时,按钮才有提交的作用

Value:按钮上显示的文字

color:本来就只针对文本而言有作用。

要改变背景色要用:background:#ccc

方法1:

提交方式改成get,然后就可以在其他页面上解析url就可以获取数据了。

方法2:

将表单数据用cookie保存下来,然后在其他页面读cookie也可以


欢迎分享,转载请注明来源:内存溢出

原文地址: http://www.outofmemory.cn/zaji/6115495.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2023-03-15
下一篇 2023-03-15

发表评论

登录后才能评论

评论列表(0条)

保存