Jump to content
Fórum Script Brasil
  • 0

Passar Valor Para Campo Input. Com 4 Variaveis



3 answers to this question

Recommended Posts

  • 0

Bom simultaniamente não sei se e possivel mas soma você pode concatenar o conteudo de cada campo na ordem em que você quiser fica tipo assim

var camp1=document.getElementById('cp1').value;
var camp2=document.getElementById('cp2').value;
var camp3=document.getElementById('cp3').value;
var camp4=document.getElementById('cp4').value;
resultado = camp1+camp2+camp3+camp4;

os cp1..2..3 são os id dos elemtos input!!!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Forum Statistics

    • Total Topics
    • Total Posts
  • Create New...