make show/hide accessible if javascript is off
问题 $(document).ready(function(){ $("#CO_createAccount").click( function (){ if(this.checked){ $(".CO_accountForm").show(); } else { $(".CO_accountForm").hide(); } }); }); and I have the css set for ".CO_accountForm" set to "display:none;" But, I want the hidden element to be visible if javascript is turned off. I assume I can do this by adding a hidden class the above, but how would I go about this? Thanks! 回答1: Remove the display:none attribute for the ".CO_accountForm" and instead hide/set the