woensdag 24 juli 2013

How to make a webpage read-only (disable input) with jQuery.

$("input:button").attr("disabled", true); // Disables all buttons $("input:text").attr("disabled", true); $("input:checkbox").attr("disabled", true); $('#myCustomElement').attr("disabled", true);
Some extra css to gray out elements can be usefull too.