input - If clicking something else - change prop / jQuery -
if clicking else, last input (which clicked) should readonly -> true again.
here code:
<script> $(document).ready(function() { $("input").prop("readonly", true); $("input").click(function() { $(this).prop("readonly", false); }); }); </script>
thanks!
try this
--to make input editable on click $('input').bind('click', function () { $(this).prop("readonly", false); }); --to make input readonly on lost focus $('input').bind('blur', function () { $(this).prop("readonly", true); });
Comments
Post a Comment