My Messenger App
About this app
A fun and colorful messenger app for staying connected with friends and family.
My Messenger App
Related apps
Put this on your site
Source
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1">
<title>My Messenger App</title>
<meta name="description" content="A fun and colorful messenger app for staying connected with friends and family.">
<meta name="keywords" content="messenger, chat, messaging, communication, friends, family">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/css/bootstrap.min.css" rel="stylesheet"
integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC" crossorigin="anonymous">
<link href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet">
<script type="text/javascript">
try {
// App Javascript Goes Here. Place your entire script content inside the try block for error handling.
// This will run when the DOM is ready.
document.addEventListener("DOMContentLoaded", function() {
// Create the messenger app UI
const mainContainer = document.getElementById("main-container");
// Header
const header = document.createElement("header");
header.innerHTML = "<h1>My Messenger App</h1>";
mainContainer.appendChild(header);
// Chat Box
const chatBox = document.createElement("div");
chatBox.classList.add("chat-box");
mainContainer.appendChild(chatBox);
// Message List
const messageList = document.createElement("ul");
messageList.classList.add("message-list");
chatBox.appendChild(messageList);
// Input Box
const inputBox = document.createElement("div");
inputBox.classList.add("input-box");
chatBox.appendChild(inputBox);
const messageInput = document.createElement("input");
messageInput.type = "text";
messageInput.placeholder = "Type your message...";
inputBox.appendChild(messageInput);
const sendButton = document.createElement("button");
sendButton.innerHTML = "<i class='fa fa-paper-plane'></i>";
sendButton.addEventListener("click", function() {
const messageText = messageInput.value;
if (messageText.trim() !== "") {
const messageItem = document.createElement("li");
messageItem.textContent = messageText;
messageList.appendChild(messageItem);
messageInput.value = "";
}
});
inputBox.appendChild(sendButton);
});
} catch (error) {
// This will throw the error to the parent window.
throw error;
}
</script>
<style>
/* App CSS Goes Here */
body {
background-color: #f2f2f2;
font-family: 'Roboto', sans-serif;
}
#main-container {
max-width: 600px;
margin: 0 auto;
padding: 20px;
}
header {
text-align: center;
margin-bottom: 20px;
}
.chat-box {
background-color: #fff;
border-radius: 5px;
padding: 20px;
}
.message-list {
list-style-type: none;
padding: 0;
margin-bottom: 20px;
}
.message-list li {
background-color: #f5f5f5;
border-radius: 5px;
padding: 10px;
margin-bottom: 10px;
}
.input-box {
display: flex;
align-items: center;
}
.input-box input {
flex-grow: 1;
border: none;
border-radius: 5px;
padding: 10px;
margin-right: 10px;
font-size: 16px;
}
.input-box button {
background-color: #007bff;
border: none;
border-radius: 5px;
color: #fff;
padding: 10px 15px;
font-size: 16px;
cursor: pointer;
}
</style>
</head>
<body>
<div id="main-container" class="container">
<!-- App HTML Goes Here -->
</div>
</body>
</html>
NEW APPS
These are apps made by the community!