html5 - How to separate HTML output field into 2 separate fields instead of one amalgamated field -


Currently, this code gives me the desired results for numbers, although two possible outputs are shown as a long number But I like to be able to separate them in my table.

  & lt; Form oninput = "x.value = parseInt (a.value) * parseInt (300); y.value = parseInt (a.value) * parseInt (400);" & gt; & Lt; Input name = "a" value = "" type = "text" & gt; & Lt; Output name = "x" = "a b" & gt; & Lt; Br> & Lt; / Output & gt; & Lt; = "A b" for output name = "y" & gt; & Lt; / Output & gt; & Lt; / Form & gt;   

I tried to put each field in the table

   & Lt; Input name = "A" value = "" type = "text" & gt; & Lt; / Td> & Lt; / TR & gt; & Lt; TR & gt; & Lt; Td> & Lt; = "A b" for output name = "x" & gt; & Lt; / Td> & Lt; / TR & gt; & Lt; TR & gt; & Lt; Td> & Lt; = "A b" for output name = "y" & gt; & Lt; / Td> & Lt; / TR & gt; & Lt; / Tbody & gt; & Lt; / Table & gt; & Lt; / Form & gt;   

But it only puts the input field in one table and one output and two empty table in the blank .... I am losing help? please?

If you remove two scraping output fields below the form, then you should work properly: < / P>

  & lt; Form oninput = "x.value = parseInt (a.value) * parseInt (300); y.value = parseInt (a.value) * parseInt (400);" & Gt; & Lt; Table style = "text-line: left; width: 100px;" Border = "1" cellpadding = "2" cellspacing = "2" & gt; & Lt; Tbody & gt; & Lt; TR & gt; & Lt; Td> & Lt; Input name = "A" value = "" type = "text" & gt; & Lt; / Td> & Lt; / TR & gt; & Lt; TR & gt; & Lt; Td> & Lt; = "A b" for output name = "x" & gt; & Lt; / Td> & Lt; / TR & gt; & Lt; TR & gt; & Lt; Td> & Lt; = "A b" for output name = "y" & gt; & Lt; / Td> & Lt; / TR & gt; & Lt; / Tbody & gt; & Lt; / Table & gt; & Lt; / Form & gt;   

Within a form, a name can only be used once, therefore duplicate by removing that scraping element with the name of 'y' at the top (but out of the table) The "Y" elements get the correct output field for the "Oninput" code.

Comments

Popular posts from this blog

excel vba - How to delete Solver(SOLVER.XLAM) code -

github - Teamcity & Git - PR merge builds - anyway to get HEAD commit hash? -

ios - Replace text in UITextView run slowly -