Skip to content

Refactoring a function JS [closed]

i have a problem with my code. First, i did this code and it works well. I have two modals and i wanna to rewrite. // Modal Carrinho const openModal = document.querySelector(‘[data-modal=”open&…

Go to next input field at maxLength?

I have a form in Vue that has some combined inputs for styling reasons for a phone number input. My problem is that the user has to hit tab in order to go to the next input field of the phone number. Is there a way to check for the max length of the current and input and when that

Prioritise a div or image to load first

Here’s some example code, I would like to prioritise “div1” to load before anything else does. Answer Just via HTML you cannot prioritize what will load first on your web page. The page loads from the Top to Down approach, which first <HEAD> and its content, then <BODY> and its c…

Getting problem in making a timer/ count-down code in ReactJs

I am getting a problem in making a countdown timer which will start on clicking on start button and it will stop onClicking on the stop button. I have made that thing on javascript but when I came to reactJs, I am getting unable. I am providing all the codes. And please check what is the problem. Answer Issue…

how to get data use fetch API correctly in vue js?

I’m trying to fetch data from the backend using the GET method, but I always fail to get the data. I get the following error: CORS header ‘Access-Control-Allow-Origin’ missing. I don’t know how it happens because I tried to use POST method to my backend it worked. Here’s a capture of my brow…