-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
40 lines (34 loc) · 962 Bytes
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
<!DOCTYPE html>
<html>
<head>
<title>AI Chat</title>
<link rel="stylesheet" type="text/css" href="style.css">
<link rel="stylesheet" type="text/css" href="markdown.css">
</head>
<body>
<h1>AI Chatbot</h1>
<div id="chats">
<button onclick="newchat();">New Chat</button>
</div>
<div id="chat-history">
<p id="Welcome-Message">Bot: Hello! ask me anything!</p>
</div>
<form id="message-form">
<input type="text" id="user-message" placeholder="Type your message..." />
<button type="submit">Send</button>
</form>
<script>
function newchat() {
var chatbutton = document.createElement('button');
chatbutton.innerHTML = 'New Chat';
chatbutton.onclick = '';
var chat = document.createElement('div');
chat.id = 'chat'
chat.innerHTML = '<p id="Welcome-Message">Bot: Hello! ask me anything!</p>'
document.appendChild(chatbutton);
document.appendChild(chat);
}
</script>
<script src="script.js"></script>
</body>
</html>