javascript - How to prevent input fields from gaining keyboard focus? -


I'm having trouble implementing a modal dialog in HTML5:

I have a programmatic form All background input fields I want to focus with, while the modal dialog is visible. Can the HTML input field be programmatically prevented from receiving keyboard focus?

If you keep all input fields inside a form, then on the model dialog Try it
  var form = document.getElementById ("your_form_id"); Var element = form.elements; (Var i = 0, len = elements.length; i & lt; len; ++ i) {elements [i] .readOnly = true; }    

Comments

Popular posts from this blog

cmake set_source_files_properties not working properly -

python - Writing Greek in matplotlib labels, titles -

Pygame memory leak with transform.flip -