javascript - HTML entity to input value? -


I am trying to use some organizations for my e-learning project. I wanted to change the input field dynamically from an array

  var equation value = new array ("", '& # 8722;' + 1,02,3);  

And here's my code

   

But the input value does not support HTML entities.

How to use the HTML unit in input value here

What do you need to do to paste directly into the unit, use a function to convert it into text in the form of text or from the value of the unit.

  var equation value = new array ("", '-' + 1,02,3);  

Then ... something like this will appear

  & lt; Html & gt; & Lt; Top & gt; & Lt; Script type = "text / javascript" & gt; Var equation = value = ["", '& amp; # 8722; ' + 1,02,3] ;; Function Funk () {var mdiv = document.createElement ("div"); Mdiv.innerHTML = Equation Value [1]; Document.getElementById ('t_1_1'). Value = (mdiv.textContent || mdiv.innerText); } & Lt; / Script & gt; & Lt; / Head & gt; & Lt; Body onload = 'func ();' & Gt; & Lt; Input type = 'text' id = 't_1_1' / & gt; & Lt; / Body & gt; & Lt; / Html & gt;  

Comments

Popular posts from this blog

ios - How do I use CFArrayRef in Swift? -

eclipse plugin - Run java code error: Workspace is closed -

c - Error on building source code in VC 6 -