Intellipaat Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in Web Technology by (20.3k points)

I thought they could be, but as I'm not putting my money where my mouth was (so to speak) setting the read-only attribute doesn't actually seem to do anything.

I'd rather not use Disabled since I want the checked check boxes to be submitted with the rest of the form, I just don't want the client to be able to change them under certain circumstances.

1 Answer

0 votes
by (40.7k points)

you can try using the code given below:

<input type="checkbox" onclick="return false;"/>

The above code will work because if the click event returns false then the chain of execution will stop continuing.

Related questions

0 votes
1 answer
0 votes
1 answer
0 votes
1 answer

31k questions

32.8k answers

501 comments

693 users

Browse Categories

...