免费试用:最火的人工智能查询工具
     最强AI人工智能聊天工具
     对话机器人解答疑难问题
星外智问直连原始API接口(GPT-4o)
➡️未登录受限条数,请登陆使用完整服务>>>➡️
请输入您要问的问题:


查下百度  查下必应

以下是单个问题的回复:

问:使用html和css写一个问答网页,要求有提问框,回答框,都在网页中间,网页最上边有一行标题,叫做chatgpt机器人,还需要有一个提问按钮,要求按钮是比较好看的按钮,并且与chatgpt官方api的回答相连接,按钮点击获取回答结果
GPT答: 7i24.cn
并展示出来

```
<html>
  <head>
    <style type="text/css">
        body {
            font-family: sans-serif;
            font-size: 16px;
        }
        #container {
            width: 800px;
            margin: 0 auto;
            text-align: center;
        }
        h1 {
            font-size:24px;
        }
        #question-box {
            width: 700px;
            margin: 20px auto;
            border: 1px solid #ccc;
            padding: 10px;
        }
        #answer-box {
            padding: 10px;
            margin: 10px auto;
            width:700px;
            border:1px solid #ccc;
        }
        .btn {
            background-color: #0088cc;
            color: white;
            padding: 10px 20px;
            font-size:20px;
        }
    </style>
  </head>
  <body>
      <div id="container">
          <h1>Chatgpt机器人</h1>
          <div id="question-box">
              您想要问的问题
          </div>
          <div>
              <button type="button" class="btn">提问</button>
          </div>
          <div id="answer-box">
              Chatgpt机器人给出的回答
          </div>
      </div>
  </body>
</html>
```

Javascript代码(使用Chatgpt官方API):
```
document.querySelector('button').addEventListener('click',
function(){
  //获取提问框输入的内容
  var question = document.querySelector('#question-box').value;
  
  //请求Chatgpt官方API
  fetch('https://api.chatgpt.com/v1/data/question', {
    method: 'POST',
    headers: { 
      'Content-Type': 'application/json'
    },   
    body: JSON.stringify({
        "question": question
    })
  })
  .then(function(response) {
      return response.json();
  })
  .then(function(responseJSON) {
      //获取Chatgpt机器人返回的回答
      var answer = responseJSON.data.answer;
      //显示在回答框
      document.querySelector('#answer-box').innerHTML = answer;
  });
});
```
一星  二星  三星  四星  五星 

互联网非法外之地,请不要输入不良内容
 查下百度 查下必应 02-20 00:06:30



chatGPT中国版--星外智问--8v6.CN
当前运行网址:haoadm.com
客服微信:xwgdd_com APP下载 怎么问 识别真假GPT4 使用GPT赚钱 退出登陆