母婴室设置要求和标准
body {
fontfamily: Arial, sansserif;
margin: 0;
padding: 20px;
}
h1 {
textalign: center;
marginbottom: 30px;
}
form {
width: 80%;
maxwidth: 500px;
margin: 0 auto;
border: 1px solid ccc;
padding: 20px;
}
label {
display: block;
marginbottom: 5px;
}
input[type="text"], textarea {
width: 100%;
padding: 5px;
marginbottom: 10px;
}
button {
backgroundcolor: 007bff;
color: white;
padding: 10px 20px;
border: none;
cursor: pointer;
borderradius: 5px;
}
.response {
margintop: 20px;
padding: 15px;
border: 1px solid ddd;
backgroundcolor: f9f9f9;
}
母婴室意见本
// 模拟提交反馈的JavaScript逻辑
document.getElementById("feedbackform").addEventListener("submit", async (e) => {
e.preventDefault();
const name = document.getElementById("name").value;
const email = document.getElementById("email").value || "";
const topic = document.getElementById("topic").value;
const rating = document.getElementById("rating").value;
const feedback = `${name}: ${topic} ${rating}分`;
document.getElementById("responsearea").innerHTML = `
${feedback}
`;// 假设这里发送到服务器或保存到本地
// 您可以根据实际需求替换为API请求或数据库操作
console.log("反馈已提交:", feedback);
});