Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6569699
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T14:39:52+00:00 2026-05-25T14:39:52+00:00

<form id=v-1> <input type=radio name=ot-1 value=o-1 /> answer1 <input type=radio name=ot-1 value=o-2 /> answer2

  • 0
    <form id="v-1">
        <input type="radio" name="ot-1" value="o-1" /> answer1
        <input type="radio" name="ot-1" value="o-2" /> answer2
        <input type="radio" name="ot-1" value="o-3" /> answer3
        <input type="radio" name="ot-1" value="o-4" /> answer4
    </form>

How to make: if checked Answer 1, then in var test adds 1 point, if one of other Answers cheked, then adds 0 points?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T14:39:53+00:00Added an answer on May 25, 2026 at 2:39 pm
    <form id="v-1">
        <input type="radio" name="ot-1" value="o-1" /> answer1
        <input type="radio" name="ot-1" value="o-2" /> answer2
        <input type="radio" name="ot-1" value="o-3" /> answer3
        <input type="radio" name="ot-1" value="o-4" /> answer4
    </form>
    

    JS:

    <script>
    
        test = 0;
        $('input[name=ot-1]').click(function(){
            if($(this).val()=="o-1"){
                test=test+1;
            }
        });
    </script>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have radioboxes <form method=post id=myform> <label>A</label> <input type=radio name=formtype value = 1 checked=checked>
Example to save gender <form action=save.php?id=<?=$id?> method=post> <p><label><input name=gender type=radio value=male <?php if($gender=='male'){?>checked=checked<? }?>
So, I have radio boxes of the form <li><input type=radio name=names value=blah><a>Some text (blah)</a></li>
HTML: <form> <input type=radio name=grade value=95 /> A<br /> <input type=radio name=grade value=85 />
<form action=1.html> <input type=radio id=check1 name=check /> <input type=radio id=check2 name=check /> </form> What
How to get the type of input in the form by its name? for
<form method=post action=sendmail.php name=Email_form> Message ID <input type=text name=message_id /><br/><br/> Aggressive conduct <input type=radio
I have an ASP.NET Webform and inside the form I have an input type
I have an input form with two textareas allowing a user to type in
HTML has an input button type to reset all fields in a form to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.