javascript - jQuery Multiple Append -


I want to add multiple values ​​to the input, how I can dry up the code. Maybe in a function, thanks!

  var $ inputFirst = $ ('Input: first'). Val (); Var $ inputSecond = $ ('Input: Second'). Val (); $ ('Ul'). Attachment (' li & gt;' + $ input5 + '& lt; / li & gt;'); $ ('Ul') .andand ('
  • gt;' + $ inputscand + '& lt; / li & gt;');

    This should work for you

      $ ( ': Input'). Each (function (i) {$ ('ul'). Enclosed ('
  • gt;' + $ (': input'). Eq (i) .val () + '& lt; / li & Gt; ')})

  • Comments

    Popular posts from this blog

    ios - Adding an SKSpriteNode to SKScene from a child SKSpriteNode -

    Matlab transpose a table vector -

    c# - Textbox not clickable but editable -