update
This commit is contained in:
@@ -105,6 +105,8 @@
|
||||
<textarea id="content" name="content" rows="8" placeholder="请详细描述问题">
|
||||
</textarea>
|
||||
</div>
|
||||
<!-- 隐藏字段:当前页面URL -->
|
||||
<input type="hidden" id="pageUrl" name="pageUrl" />
|
||||
<div style="text-align: right;">
|
||||
<input class="button" type="submit" value="发送" id="submitBtn" />
|
||||
</div>
|
||||
@@ -122,6 +124,10 @@ const companyInput = document.getElementById("company");
|
||||
const emailInput = document.getElementById("email");
|
||||
const topicSelect = document.getElementById("topic");
|
||||
const contentTextarea = document.getElementById("content");
|
||||
const pageUrlInput = document.getElementById("pageUrl");
|
||||
|
||||
// 设置当前页面URL到隐藏字段
|
||||
pageUrlInput.value = window.location.href;
|
||||
|
||||
// 获取消息弹出框元素
|
||||
const messageModal = document.getElementById("messageModal");
|
||||
@@ -222,7 +228,8 @@ customerForm.onsubmit = function(event) {
|
||||
company: companyInput.value.trim(),
|
||||
email: emailInput.value.trim(),
|
||||
topic: topicSelect.value,
|
||||
content: contentTextarea.value.trim()
|
||||
content: contentTextarea.value.trim(),
|
||||
pageUrl: pageUrlInput.value
|
||||
};
|
||||
|
||||
// 发送AJAX请求
|
||||
|
||||
Reference in New Issue
Block a user