Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/406.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript js中的get请求未在url中追加表单数据_Javascript_Html_Node.js_Express - Fatal编程技术网

Javascript js中的get请求未在url中追加表单数据

Javascript js中的get请求未在url中追加表单数据,javascript,html,node.js,express,Javascript,Html,Node.js,Express,它是一个用于表单页面的快速路由器模块,用于接收用于添加书籍详细信息的数据。但在提交时,url中不包含任何表单数据。在“?”后面是空白的 网址显示http://localhost:5000/admin/addBook/add?" <form class="container col-md-5 signupform bg-white my-4 py-3 formShadow" method="GET" action=&qu

它是一个用于表单页面的快速路由器模块,用于接收用于添加书籍详细信息的数据。但在提交时,url中不包含任何表单数据。在“?”后面是空白的 网址显示http://localhost:5000/admin/addBook/add?"

<form class="container col-md-5 signupform bg-white my-4 py-3 formShadow" method="GET"
                action="/admin/addBook/add" , onsubmit="return validate()">
                <label class="form-label ">ENTER BOOK TITLE:</label>
                <input class="form-control " type="text" placeholder="Book Title" id="title">
                <br>
                <label class="form-label">ENTER BOOK AUTHOR:</label>
                <input class="form-control " type="text" placeholder="Book Author" id="author">
                <br>
                <label class="form-label">ENTER BOOK GENRE:</label>
                <input class="form-control " type="text" placeholder="Book Author" id="genre">
                <br>
                <label class="form-label ">UPLOAD IMAGE:</label>
                <input class="form-control " type="file" id="image">
                <br>
                <div class="text-center">
                <button type="submit" class="btn loginbutton" id="add">ADD</button>
                </div>
            </form>

输入书名:

输入图书作者:
输入图书类型:
上载图像:
添加
没有一个表单元素具有
名称
属性,浏览器将该属性用作键/值对中的键。因为没有密钥,所以没有要发送的数据

添加
name
属性:

<input class="form-control " type="text" placeholder="Book Title" id="title" name="title">
<!-- etc. -->