My javascript function only works when the page is fully loaded-PHP Chinese Network Q&A
My javascript function only works when the page is fully loaded
P粉320361201
P粉320361201 2023-09-11 16:31:59
0
1
405

I want to disable the input text after the user clicks on another input tag with checkbox type,

The problem is that the date range input text is not disabled every time I click on the checkbox, can anyone help?

function myFunction() { document.getElementById("daterange").disabled = true; }

Everyday

edit:I just realized that when the page is not fully loaded it works as I expected, but if the page is fully loaded there seems to be something that prevents the functionality from working

P粉320361201
P粉320361201

reply all (1)
P粉667649253

Maybe you can try usingalpineJS

in laravel

Everyday

If you use laravel brezze, alpine JS is already included. We can easily manipulate our DOM without writing a lot of JS code. Just write in inline HTML

    Latest Downloads
    More>
    Web Effects
    Website Source Code
    Website Materials
    Front End Template
    About us Disclaimer Sitemap
    php.cn:Public welfare online PHP training,Help PHP learners grow quickly!