<!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>
```
script有开始也要结束,我只看到这个
上面照片显示不了,看下面
我是希望,把表单输入的变量(表单后面会设计成下拉表单,可以直接选择输入的内容),
生成一句话,然后把这句话提交到数据库中,再把数据库中同一天的日志读取出来,
生成word文档,因为每天工作很繁琐
有开始也要结束啊
浏览器F12找错
不是很推荐这种在线的方式,如果可以的话去下载一个JQuery到本地目录,不仅速度更快以及对离线调试也很好。
我是希望,把表单输入的变量(表单后面会设计成下拉表单,可以直接选择输入的内容),
生成一句话,然后把这句话提交到数据库中,再把数据库中同一天的日志读取出来,
生成word文档,因为每天工作很繁琐
这个最好弄到本地吧,如果网络不通的话,这个加载就有问题了。
标签没有结束 调试一下
在网页检查元素进行调试
你这个是代码格式报错,浏览器不认,首先应该把script放到ul下面,或者放到window的ready加载事件中,这是浏览器自上而下的加载机制,其次是script是封闭标签而非单标签
你可以试试浏览器F12找错
首先没有结束标签
其次js尽量不要写在form里面,不好看
你下个jqery.mim.js文件到本地,另外你标签也没结束吧。。。。
jquery去下载个本地文件,js代码最好放body下面,还有script标签是闭合标签
标签都没有结束吧</p>
页面上看JS报错了没