I am making a web chat room application, and today I want to add the function of sending emoji. I encountered two problems while writing JS.
Question 1: When adding a click event to the traversed emoji image, you want to get the text content of the writing panel #write first. Use getElementById to get "", but you can use $("#write").val( )Get the previously written content;
Question 2: If you have written content before clicking the emoji, the emoji cannot be printed?
Code: (Sorry, it seems a bit uncomfortable to use JS and Jquery together)
function clickEmoj(){//Generate and destroy emoj
var emojs = ['
My implementation logic is very simple