qq_41221452 2017-11-30 15:42 采纳率: 30%
浏览 1251
已采纳

求助,表单引用jQuery后显示出问题

 <!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=utf-8" />
<title>HTML5 Contact Form</title>

<style type="text/css">
.contact_form{border:1px solid #DDDDDD;padding:10px;width:760px;margin:40px auto 0 auto;}
</style>

<link rel="stylesheet" media="screen" href="styles.css" >

</head>
<body>

<form class="contact_form" action="intoA.php" method="post" name="contact_form"><!--"#"用来填处理表单数据的php文件-->
<ul>
        <li>
            <h2>城管日志系统</h2>
        </li>
        <li>
            <label for="name">姓名:</label>
            <input type="name" id="name" required />
        </li>
        <li>
            <label for="place">地址:</label>
            <input type="place" id="place" required />
        </li>
        <li>
            <label for="method">处理方式:</label>
            <input type="method" id="method" required />
        </li>
<li>
            <label for="people">人数:</label>
            <input type="people" id="people" required />
        </li>
        <li>
            <label for="time">日期</label>
            <input type="time" id="time" required />
        </li>
        <li>
            <label for="number">编号</label>
            <input type="number" id="number" required />
        </li>
        <li>
            <button class="submit" type="submit">提交</button>
        </li>
    </ul>
</form>

</body>
</html>

图片说明

 <title>HTML5 Contact Form</title>

<style type="text/css">
.contact_form{border:1px solid #DDDDDD;padding:10px;width:760px;margin:40px auto 0 auto;}
</style>

<link rel="stylesheet" media="screen" href="styles.css" >

</head>
<body>

<form class="contact_form" action="intoA.php" method="post" name="contact_form"><!--"#"用来

填处理表单数据的php文件-->
<ul>

这里引用了jquery却显示出问题了
<script src="https://cdn.bootcss.com/jquery/1.12.4/jquery.min.js"></script>
<script>

function getZhi(){
var name = $("#name").val();
var place = $("#place").val();
var method =  $("#method").val();
var people =  $("#people").val();
var time =  $("#time").val();
var number =  $("#number").val();
var s = "来到" + place + name + "工地,现场" + people + "作业," + method + "拍照取证。" + 

"//六组/六组巡查照片/" + place + name + time;
alert(s);
}
        <li>
            <h2>城管日志系统</h2>
        </li>
        <li>
            <label for="name">姓名:</label>
            <input type="name" id="name" required />
        </li>
        <li>
            <label for="place">地址:</label>
            <input type="place" id="place" required />
        </li>
        <li>
            <label for="method">处理方式:</label>
            <input type="method" id="method" required />
        </li>
<li>
            <label for="people">人数:</label>
            <input type="people" id="people" required />
        </li>
        <li>
            <label for="time">日期</label>
            <input type="time" id="time" required />
        </li>
        <li>
            <label for="number">编号</label>
            <input type="number" id="number" required />
        </li>
        <li>
            <button class="submit" type="submit">提交</button>
        </li>
    </ul>
</form>
</body>
</html>
```![图片说明](https://img-ask.csdn.net/upload/201711/30/1512056393_290137.png)

  • 写回答

17条回答 默认 最新

  • Lighthouse9527 2017-11-30 16:04
    关注

    script有开始也要结束,我只看到这个

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(16条)

报告相同问题?

悬赏问题

  • ¥30 python代码,帮调试
  • ¥15 #MATLAB仿真#车辆换道路径规划
  • ¥15 java 操作 elasticsearch 8.1 实现 索引的重建
  • ¥15 数据可视化Python
  • ¥15 要给毕业设计添加扫码登录的功能!!有偿
  • ¥15 kafka 分区副本增加会导致消息丢失或者不可用吗?
  • ¥15 微信公众号自制会员卡没有收款渠道啊
  • ¥100 Jenkins自动化部署—悬赏100元
  • ¥15 关于#python#的问题:求帮写python代码
  • ¥20 MATLAB画图图形出现上下震荡的线条