GPT答: |
7i24.cn
|
接,按钮点击获取回答结果
<html>
<head>
<title>ChatGPT机器人</title>
<style>
*{
font-size: 13px;
}
body{
margin: 0;
padding: 0;
}
.container{
width: 500px;
margin: 20px auto;
}
.title{
padding: 10px;
text-align: center;
}
.ask-input{
width: 100%;
border: 1px solid #ccc;
border-radius: 4px;
padding: 10px;
margin-bottom: 10px;
}
.btn-ask{
width: 100%;
background-color: #2eb398;
padding: 10px 0;
text-align: center;
font-weight: bold;
color: white;
border: 0;
border-radius: 4px;
}
.answer{
background-color: #f4f4f4;
padding: 10px;
}
</style>
</head>
<body>
<div class="container">
<div class="title">
<h2>ChatGPT机器人</h2>
</div>
<div>
<input type="input" class="ask-input" placeholder="输入您想要问的问题"/>
</div>
<div>
<input type="button" onclick="getAnswer()" class="btn-ask" value="提交提问"/>
</div>
<div class="answer">
答案:
</div>
</div>
<script>
function getAnswer(){
//AJAX connect api and get answer
}
</script>
</body>
</html>
|