Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

chat v2 msg and time good

make
input id = inpu
button onclick = sendMsg()
div id = bodyMsg


code 

function sendMsg() {

	var Content_inp = document.getElementById("inpu").value;
	var Content_div = document.getElementById("bodyMsg");
     
     var d = new Date(); // for now
		data = d.getHours()+":"+d.getMinutes()+":"+d.getSeconds();

	Content_div.innerHTML += data+'<br>'+Content_inp +'<br>';
	
}
Comment

PREVIOUS NEXT
Code Example
Javascript :: set of these properties: in js 
Javascript :: Uncaught (in promise) TypeError: dispatch is not a function 
Javascript :: ... Notation In JavaScript 
Javascript :: code with mosh swipable react native not working 
Javascript :: phaser time event start at 
Javascript :: phaser wrap sprite 
Javascript :: how to have two entry files in webpack 
Javascript :: Creating New Transaction Object for blockchain 
Javascript :: Sorting the Odd way! 
Javascript :: force browser reload page from server javascript 
Javascript :: react router how to prevent navlink from two classes 
Javascript :: palindrome short way 
Javascript :: css to jss 
Javascript :: push replacement getx 
Javascript :: save to text or html file very good 
Javascript :: A Method In Class That Accesses A Property 
Javascript :: prisma write database 
Javascript :: prisma get single data query 
Javascript :: get images from mysql with php jquery ajax and display them in html page inside DIVs 
Javascript :: wait untill 2 
Javascript :: slicer 
Javascript :: react private routes 
Javascript :: How to fix prettier messing up your HTML on save 
Javascript :: responsive navbar react 
Javascript :: jquery if element has multiple classes 
Javascript :: how to convert string into int js 
Javascript :: match all characters regex 
Javascript :: upload image with react 
Javascript :: how to sort linesin javascript 
Javascript :: optional css tippy 
ADD CONTENT
Topic
Content
Source link
Name
8+4 =