console
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>奇遇问答查询工具</title>
<style>
*{box-sizing:border-box;margin:0;padding:0;font-family:system-ui,sans-serif}
body{max-width:700px;margin:30px auto;padding:0 16px;background:#f5f7fa}
.box{background:#fff;padding:24px;border-radius:12px;box-shadow:0 2px 10px #00000010}
h2{text-align:center;margin-bottom:20px;color:#222}
input{width:100%;padding:12px 14px;font-size:16px;border:1px solid #ddd;border-radius:8px;outline:none}
input:focus{border-color:#4080ff}
#result{margin-top:20px}
.item{border:1px solid #e8e8e8;border-radius:8px;padding:14px;margin-bottom:12px}
.q{font-weight:bold;color:#222;margin-bottom:6px}
.a{color:#444;white-space:pre-line}
.none{color:#888;text-align:center;padding:20px}
</style>
</head>
<body>
<div class="box">
<h2>奇遇答案查询</h2>
<input id="search" placeholder="输入奇遇名称几个字就能搜索答案">
<div id="result"></div>
</div>
<script>
// ==========问答库(已经把图里全部录入好了)==========
const qaList = [
{q:"佳人邀约", a:"仔细斟酌"},
{q:"大展宏图", a:"茶具"},
{q:"庖厨风波", a:"训话"},
{q:"奇妙药丸", a:"一颗"},
{q:"庙中奇遇", a:"探查"},
{q:"流晶河上", a:"离去"},
{q:"夜探皇城", a:"太监"},
{q:"天子佩剑", a:"朝廷"},
{q:"抄袭疑云", a:"静观"},
{q:"雾中杀机", a:"逃开"},
{q:"失传剑法", a:"交锋"},
{q:"赏花惊驾", a:"皇子"},
{q:"单于宠姬", a:"有教无类"},
{q:"兑银风波", a:"见票"},
{q:"大雪丰年", a:"煤炭"},
{q:"千钧一发", a:"静观"},
{q:"御敌之术", a:"轮番上阵"},
{q:"天下一人", a:"急流勇退"},
{q:"一壶山水", a:"讨价"},
{q:"地摊杂书", a:"拒绝"},
{q:"刺客阻路", a:"练手"},
{q:"府中密道", a:"探查"},
{q:"十步之内", a:"火枪"},
{q:"神庙踪迹", a:"前进"},
];
// ==============================================================
const searchInput = document.getElementById('search');
const resultDom = document.getElementById('result');
searchInput.oninput = function(){
const kw = this.value.trim().toLowerCase();
resultDom.innerHTML = "";
if(!kw) return;
const match = qaList.filter(item=> item.q.toLowerCase().includes(kw));
if(match.length === 0){
resultDom.innerHTML = `<div class="none">没有找到对应的内容</div>`;
return;
}
match.forEach(item=>{
resultDom.innerHTML += `
<div class="item">
<div class="q">【奇遇】${item.q}</div>
<div class="a">【正确选项】${item.a}</div>
</div>
`
})
}
</script>
</body>
</html>