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

Pass DB Connection parameters to a Kettle a.k.a PDI table Input step dynamically from Excel -

multithreading - PhantomJS-Node in a for Loop -

c++ - MATLAB .m file to .mex file using Matlab Compiler -