现在的位置: 首页 > 综合 > 正文

html页面使一个button按钮具有一个submit功能

2013年03月31日 ⁄ 综合 ⁄ 共 896字 ⁄ 字号 评论关闭
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
    <title>表单测试</title>
    <script type="text/javascript">
        function readysubmit() {
            if (confirm("您真的要提交吗?")) {
                document.getElementById("formid").submit();
            }
            else {
                return false;
            }
        }
    </script>
    
</head>
<body>
<form id="formid" method ="get" action="zgh2.htm" >
<fieldset><legend>图书信息</legend>
<p>
<p>请输入书目名称:
<input type=text name="bookname" size=50>
<p>
<b>选择书目类别:</b><br>
<input type=checkbox name="booktype" value="abc古典" > 古典用品<br>
<input type=checkbox name="booktype" value="现代" > 现代作品<br>
<input type=checkbox name="booktype" value="技术" checked> 技术作品<br>
<b>请选择出版国家:</b><br>
<select muliple name="country" size=4>
    <option selected value="中国">中国
    <option selected value="美国">美国
    <option selected value="英国">英国
    <option selected value="德国">德国    
</select>
<p>
</fieldset>
<p>
<input type="button" value="确定" onclick="return readysubmit();">
<input type="reset" value="重置">
</form>
</body>
</html>

http://www.debugease.com/javascript/701173.html

抱歉!评论已关闭.