Jump to content
Fórum Script Brasil
  • 0

Somando Radio+radio


henrick21
 Share

Question

Fiz este codigo, mas não esta funcionando, alguém pode me dizer o porque?

<form name=form>

<input name=i1 onclick="document.form.soma.value+=this.value" value='10' type=radio> 10<br>

<input name=i1 onclick="document.form.soma.value+=this.value" value='20' type=radio> 20<br>

<hr>

<input name=t1 onclick="document.form.soma.value+=this.value" value='1' type=radio> 1<br>

<input name=t1 onclick="document.form.soma.value+=this.value" value='2' type=radio> 2<br>

<hr>

<input name=v1 onclick="document.form.soma.value+=this.value" value='100' type=radio> 100<br>

<input name=v1 onclick="document.form.soma.value+=this.value" value='200' type=radio> 200<br>

<br>

<font size=1 face=verdana>Sub-Total: </font><input type=text name=soma>

</form>

Link to comment
Share on other sites

3 answers to this question

Recommended Posts

  • 0

exatamente rodrigo, eu postei este tópico pois queria ajudar voce mas não consegui e pedi a opniao dos aliados, mas acho que é quase isto.

adicione estas linhas e veja que não muda nada, já tentei.

se vocë estiver querendo dizer isto:

<input name=v1 onclick="document.form.soma.value+=eval(this.value+3)" value='200' type=radio> 100

<input name=v1 onclick="document.form.soma.value+=eval(document.form.v1[0].value+this.value)" value='200' type=radio> 200

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.

Guest
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.

 Share



  • Forum Statistics

    • Total Topics
      151k
    • Total Posts
      649.1k
×
×
  • Create New...