简体   繁体   English

如何仅使用严格的javascript / jquery / ajax(不使用node.js / socket.io)在仅2个用户之间创建网络聊天

[英]How do I create a web chat between only 2 users using strictly javascript/jquery/ajax(No node.js/socket.io)

I am in a front end internship interview where I was told to build a web chat for just two users and focus on the functionality not the ui. 我在一次前端实习面试中被告知要为两个用户建立一个网络聊天,并专注于功能而不是ui。

This question shocked me and I'm not sure where to begin as I'm of the opinion that chat apps used only server side scripting 这个问题使我震惊,我不确定从哪里开始,因为我认为聊天应用程序仅使用服务器端脚本

Help!!! 救命!!! I am a newbie developer, how is my js code supposed to look like? 我是新手开发人员,我的js代码应该是什么样子?

You can't do this without server side scripting. 没有服务器端脚本,您将无法做到这一点。

You need: 你需要:

  1. SQL database to store chat SQL数据库存储聊天
  2. PHP to pull data from database and send it PHP从数据库中提取数据并发送
  3. Ajax to refresh displayed content Ajax刷新显示的内容

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM