Hello, there is a site with such a pollevom water messages in chat.
<form id="chatForm"><input class="form-control" placeholder="Type here to chat..." id="chatMessage" maxlength="200" autocomplete="off" type="text"></form> I need to send a message from me to the chat at the entrance to the site. Without reloading the page. Because when sending a message, then you still need to press the button ok. As confirmation of sending. Those. submitting a form using sumbit. Not coming Because after the sambit the page immediately reloads.
And if you manually write a message and press enter, the message is sent and the page does not reload. Immediately I will say the site is not mine. I want to make an extension.
So I fill in the field to send
document.getElementById('chatMessage').value = 'Сообщение'; And you need to automate the sending.
How can I implement sending a message for this field by simulating pressing the enter button?