Quiz online

can you anyone help me
i have hw make online quiz kind of question MCQ and Fill in the blank and Calculate the result of the test and show it to the user.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<title> Quiz 1</title>
<script type="text/javascript">


// check result funcation
function checkQuiz()
{
var res=0;
for(var i=0; i < q1.length; i++) {
            if(q1[i].checked) {
                 var ans = q1[i].value;
                 i = q1.length;
                                   }
                 if (ans==" $400 million."){res=res+1;}

for(var i=0; i < q2.length; i++) {
            if(q2[i].checked) {
                 var ans = q2[i].value;
                 i = q2.length;
                                   }
                 if (ans=="$400 million."){res=res+1;}

for(var i=0; i < q3.length; i++) {
            if(q3[i].checked) {
                 var ans = q3[i].value;
                 i = q3.length;
                                   }
                 if (ans=="$400 million."){res=res+1;}

for(var i=0; i < q4.length; i++) {
            if(q4[i].checked) {
                 var ans = q4[i].value;
                 i = q4.length;
                                   }
                 if (ans=="$400 million."){res=res+1;}

document.write( "Your result " + res + " of 10 ");


var radBtns = new Array();
window.onload=function() {
 q1 = document.getElementsByName("q1");     
}
//function lower case
function lowerCase(y)
{
var x=document.getElementById(y).value;
document.getElementById(y).value=x.toLowerCase();
}
</script>
</head>
<body>

<form action="">
<p>Chose correct answer<br /></p>
<ol>
<li>The ACE Company has five plants nationwide that cost $100 million. The current market value of the plants is $500 million. The plants will be recorded and reported as assets at<br />
   <p><input type="radio" name="q1" value="wrong"/> $100 million.<br />
   <input type="radio" name="q1" value=" $400 million." /> $400 million.<br />
   <input type="radio" name="q1" /> $500 million.<br />
   <input type="radio" name="q1" /> $600 million.</p>
</li>
<li><p>Liabilities<br /> 
   <input type="radio" name="q2" /> are future economic benefits.<br /> 
   <input type="radio" name="q2" /> are existing debts and obligations.<br /> 
   <input type="radio" name="q2" value="wrong"/> possess service potential.<br /> 
   <input type="radio" name="q2" value="wrong"/> are things of value used by the business in its operation.<br /> 
</p></li>

<li><p>If total liabilities decreased by $15,000 and owner’s equity increased by $5,000 during a
period of time, then total assets must change by what amount and direction during that
same period?<br />  
   <input type="radio" name="q2" value="wrong"/> $20,000 increase<br /> 
   <span id="correct2"><input type="radio" name="q2" value="correct"/> $10,000 decrease</span><br /> 
   <input type="radio" name="q2" value="wrong"/> $10,000 increase<br /> 
   <input type="radio" name="q2" value="wrong"/> $15,000 decrease<br />  
</p></li>
<li><p>If total liabilities decreased by $15,000 and owner’s equity decreased by $5,000 during a period of time, then total assets must change by what amount and direction during that same period?<br /> 
   <input type="radio" name="q2" value="wrong"/> $20,000 increase<br /> 
   <input type="radio" name="q2" value="correct"/> $10,000 increase<br /> 
  <input type="radio" name="q2" value="wrong"/> $20,000 decrease<br /> 
   <input type="radio" name="q2" value="wrong"/> $10,000 decrease <br /> 
</p></li>
<li><p> If total liabilities increased by $14,000 during a period of time and owner’s equity decreased by $6,000 during the same period, then the amount and direction (increase or
decrease) of the period’s change in total assets is a(n)<br /> 
   <input type="radio" name="q2" value="wrong"/> $14,000 increase.<br /> 
   <input type="radio" name="q2" value="correct"/> $20,000 increase.<br /> 
   <input type="radio" name="q2" value="wrong"/> $8,000 decrease.<br /> 
   <input type="radio" name="q2" value="wrong"/> $8,000 increase.<br /> </p></li>
</ol>
<!--Fill in balnk-->
<p><br /> <br />Fill in the Blank</p>
<ol>
<li><p>Owner's equity is decreased by <input type="text" name="q2" id="q9" onblur="lowerCase(this.id)"/> .<br/></p>
</li>

<li><p>Liabilities of a company are owed to <input type="text" name="q2" id="q8" onblur="lowerCase(this.id)"/> .<br/></p>
</li>

<li><p>Accountants refer to an economic event as a <input type="text" name="q1" id="q6" onblur="lowerCase(this.id)"/> .<br/></p>
</li>

<li><p>A private accountant can perform many activities in a business organization but would not work in <input type="text" name="q2" id="q7" onblur="lowerCase(this.id)"/> .<br/></p>
</li>

<li><p>Keeping a systematic, chronological diary of events that are measured in dollars and cents is called <input type="text" name="q2" id="q10" onblur="lowerCase(this.id)"/> .<br/></p>
</li>

</ol>

<p align="center"><input type="button" onclick="checkQuiz()" value="Result"/></p>

</form>
</body>
</html>

you have at least some syntax errors in your code.

hopefully some basic coding and debugging will help.

Total points available: 100 points

When the page loads there is an error: -10 points
Uncaught SyntaxError: Unexpected end of input

Spelling error in comment -1 point

// check result func[COLOR="red"]a[/COLOR]tion

Function missing closing brace: -5 point

For loops missing closing brace: (4 times) -20 point

Missing/misleading indentation of code: -1 point

Three duplicate loops that should be performed from one loop instead: -3 point

Wrong answer checks for parts 2, 3 and 4 -3 point

Missing checks for parts 5 onwards -6 point

Exiting loop by setting loop counter value -1 point

Defining new variables in the middle of a function -5 point

Incorrect field name question numbers for most questions -5 point

Hard-wiring answers as text strings in script to match HTML content on page, instead of using field value -5 point

Passing id to function instead of passing reference to element -3 point

Your score: 32 / 100

I hava H.W make quiz online type of questions MCQ , Fill in the blank and True or False. then Calculate the result of the test and show it to the user. :rolleyes:

I solve them but can not show result

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<title> Quiz 1</title>
<script type="text/javascript">

function valid() {
var cor = “0&#8243;
var incor = “0&#8243;
var test0 = document.getElementById("q1").value;
var test1 = document.getElementById("q2").value;
var test2 = document.getElementById("q3").value;
var test3 = document.getElementById("q4").value;
var test4 = document.getElementById("q5").value;
var test5 = document.getElementById("q6").value;
var test6 = document.getElementById("q7").value;
var test7 = document.getElementById("q8").value;
var test8 = document.getElementById("q9").value;
var test9 = document.getElementById("q10").value;
var test10 = document.getElementById("q11").value;
var test11 = document.getElementById("q12").value;
var test12 = document.getElementById("q13").value;
var test13 = document.getElementById("q14").value;
var test14 = document.getElementById("q15").value;

if (test0 == “$400 million.”) {
++cor; }
else ++incor;
if (test1 == “are existing debts and obligations.”) {
++cor; }
else ++incor;
if (test2 == “$10,000 decrease.”) {
++cor; }
else ++incor ;
if (test3 == “$20,000 decrease.”) {
++cor; }
else ++incor ;
if (test4 == “$8,000 increase.”) {
++cor; }
else ++incor;
if (test5 == “True”) {
++cor; }
else ++incor;
if (test6 == “False”) {
++cor; }
else ++incor;
if (test7 == “False”) {
++cor; }
else ++incor;
if (test8 == “False”) {
++cor; }
else ++incor;
if (test9 == “True”) {
++cor; }
else ++incor;
if (test10.toLowerCase() == “expenses”) {
++cor; }
else ++incor;
if (test11.toLowerCase() == “creditors”) {
++cor; }
else ++incor;
if (test12.toLowerCase() == “transaction”) {
++cor; }
else ++incor;
if (test13.toLowerCase() == “external auditing”) {
++cor; }
else ++incor;
if (test14.toLowerCase() == “recording”) {
++cor; }
else ++incor;
window.alert(”you got ” + cor + ” right\
 And you got ” + incor + ” wrong. You got ” + cor/2 * 100 + “% correct!”);
} 
//  End --> 
</script>
</head>
<body>

<p>Chose correct answer<br /></p>

<form action=""> 
<ol>
<li>The ACE Company has five plants nationwide that cost $100 million. The current market value of the plants is $500 million. The plants will be recorded and reported as assets at 

  <p><input type="radio" name="q1" value="$100 million."/>$100 million.<br /> 
  <input type="radio" name="q1" value="$400 million."/>$400 million.<br /> 
  <input type="radio" name="q1" value="$500 million."/>$500 million.<br /> 
  <input type="radio" name="q1" value="$600 million."/>$600 million.<br /></p>
</li> 

<li>Liabilities

  <p><input type="radio" name="q2" value="are future economic benefits."/>are future economic benefits.<br /> 
  <input type="radio" name="q2" value="are existing debts and obligations."/>are existing debts and obligations.<br /> 
  <input type="radio" name="q2" value="possess service potential."/>possess service potential.<br /> 
  <input type="radio" name="q2" value="are things of value used by the business in its operation."/>are things of value used by the business in its operation.<br /></p> 
</li> 

<li>If total liabilities decreased by $15,000 and owner’s equity increased by $5,000 during a period of time, then total assets must change by what amount and direction during that same period?

  <p><input type="radio" name="q3" value="$20,000 increase."/>$20,000 increase.<br /> 
  <input type="radio" name="q3" value="$10,000 decrease."/>$10,000 decrease.<br /> 
  <input type="radio" name="q3" value="$10,000 increase."/>$10,000 increase.<br /> 
  <input type="radio" name="q3" value="$15,000 decrease."/>$15,000 decrease.<br /> </p></li> 

<li>If total liabilities decreased by $15,000 and owner’s equity decreased by $5,000 during a period of time, then total assets must change by what amount and direction during that same period?

  <p><input type="radio" name="q4" value="$20,000 increase."/>$20,000 increase.<br /> 
  <input type="radio" name="q4" value="$10,000 increase."/>$10,000 increase.<br /> 
  <input type="radio" name="q4" value="$20,000 decrease."/>$20,000 decrease.<br /> 
  <input type="radio" name="q4" value="$10,000 decrease."/>$10,000 decrease.<br /> 
</p></li> 

<li>If total liabilities increased by $14,000 during a period of time and owner’s equity decreased by $6,000 during the same period, then the amount and direction (increase or decrease) of the period’s change in total assets is a(n)


  <p><input type="radio" name="q5" value="$14,000 increase."/>$14,000 increase.<br /> 
  <input type="radio" name="q5" value="$20,000 increase."/>$20,000 increase.<br /> 
  <input type="radio" name="q5" value="$8,000 decrease."/>$8,000 decrease.<br /> 
  <input type="radio" name="q5" value="$8,000 increase."/>$8,000 increase.<br /> </p>
 </li>

<li>Transactions that can be measured in dollars and cents are recorded in the financial information system.
  <p><input type="radio" name="q6" value="True"/>True<br />  
  <input type="radio" name="q6" value="False"/>False<br /></p>
 </li>

<li>Bookkeeping and accounting are one and the same because the bookkeeping function includes the accounting process.
  <p><input type="radio" name="q7" value="True"/>True<br />  
  <input type="radio" name="q7" value="False"/>False<br /></p>
 </li>

<li>In the owner's equity statement, revenues are listed first, followed by expenses, and net income (or net loss).
  <p><input type="radio" name="q8" value="True"/>True<br />  
  <input type="radio" name="q8" value="False"/>False<br /></p>
 </li>

<li>Net income for the period is determined by subtracting total expenses and drawings from total revenues.
  <p><input type="radio" name="q9" value="True"/>True<br />  
  <input type="radio" name="q9" value="False"/>False<br /></p>
 </li>

<li>The basic accounting equation states that Assets = Liabilities + Owner’s Equity
  <p><input type="radio" name="q10" value="True"/>True<br />  
  <input type="radio" name="q10" value="False"/>False<br /><br /> <br />
 

<strong>Fill in the Blank</strong><br /></p>
</li>

<li><p>Owner's equity is decreased by <input type="text" name="q10" id="q11" /> .<br/></p>
</li>

<li><p>Liabilities of a company are owed to <input type="text" name="q12" id="q12" /> .<br/></p>
</li>

<li><p>Accountants refer to an economic event as a <input type="text" name="q13" id="q13" /> .<br/></p>
</li>

<li><p>A private accountant can perform many activities in a business organization but would not work in <input type="text" name="q14" id="q14" /> .<br/></p>
</li>

<li><p>Keeping a systematic, chronological diary of events that are measured in dollars and cents is called <input type="text" name="q2" id="q15" /> .<br/></p>
</li>


</ol>
<p><input type="button" value="Get score" onclick="valid()"/> 
<input type="reset" value="Clear answers"/></p> 
 

</form> 
 
</body>
</html>

First thing’s first… You do not have the radio button input objects properly ID’d. All inputs must have an id attribute value because you call them in your Javascript code. The code will cut off if it tries to get an element ID that doesn’t exist in the HTML code.

Also, the first two variables in your Javascript code need to have a semicolon after them or else the code will cut off right there.

what means id attribute value for radio button

He doesn’t need to do that. His javascript should not be considered to be correct. He could instead use getElementsByName to retrieve each of the radio groups by name, so that he can then loop through them to check that they are appropriately answered or not.

I do some modify in code

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<title> Quiz 1</title>
<script type="text/javascript">

function valid() {
var cor = "0" ;
var incor = "0";
for(var i=0; i < radBtns1.length; i++) {
            if(radBtns[i].checked) {
                 var test0 = radBtns[i].value;
                                   }     
                                            }
for(var i=0; i < radBtns2.length; i++) {
            if(radBtns[i].checked) {
                 var test1 = radBtns[i].value;
                                   }     
                                            }
for(var i=0; i < radBtns3.length; i++) {
            if(radBtns[i].checked) {
                 var test2 = radBtns[i].value;
                                   }     
                                            }
for(var i=0; i < radBtns4.length; i++) {
            if(radBtns[i].checked) {
                 var test3 = radBtns[i].value;
                                   }     
                                            }
for(var i=0; i < radBtns5.length; i++) {
            if(radBtns[i].checked) {
                 var test4 = radBtns[i].value;
                                   }     
                                            }
for(var i=0; i < radBtns6.length; i++) {
            if(radBtns[i].checked) {
                 var test5 = radBtns[i].value;
                                   }     
                                            }
for(var i=0; i < radBtns7.length; i++) {
            if(radBtns[i].checked) {
                 var test6 = radBtns[i].value;
                                   }     
                                            }
for(var i=0; i < radBtns8.length; i++) {
            if(radBtns[i].checked) {
                 var test7 = radBtns[i].value;
                                   }     
                                            }
for(var i=0; i < radBtns9.length; i++) {
            if(radBtns[i].checked) {
                 var test8 = radBtns[i].value;
                                   }     
                                            }
for(var i=0; i < radBtns10.length; i++) {
            if(radBtns[i].checked) {
                 var test9 = radBtns[i].value;
                                   }     
                                            }
test10 = document.getElementById("q11").value;
test11 = document.getElementById("q12").value;
test12 = document.getElementById("q13").value;
test13 = document.getElementById("q14").value;
test14 = document.getElementById("q15").value;



if (test0 == "$400 million.") {
++cor; }
else ++incor;
if (test1 == "are existing debts and obligations.") {
++cor; }
else ++incor;
if (test2 == "$10,000 decrease.") {
++cor; }
else ++incor ;
if (test3 == "$20,000 decrease.") {
++cor; }
else ++incor ;
if (test4 == "$8,000 increase.") {
++cor; }
else ++incor;
if (test5 == "True") {
++cor; }
else ++incor;
if (test6 == "False") {
++cor; }
else ++incor;
if (test7 == "False") {
++cor; }
else ++incor;
if (test8 == "False") {
++cor; }
else ++incor;
if (test9 == "True") {
++cor; }
else ++incor;
if (test10.toLowerCase() == "expenses") {
++cor; }
else ++incor;
if (test11.toLowerCase() == "creditors") {
++cor; }
else ++incor;
if (test12.toLowerCase() == "transaction") {
++cor; }
else ++incor;
if (test13.toLowerCase() == "external auditing") {
++cor; }
else ++incor;
if (test14.toLowerCase() == "recording") {
++cor; }
else ++incor;
alert("you got " + cor + " right\
 And you got " + incor + " wrong. You got " + cor/2 * 100 + "% correct!");
} 
var radBtns1 = new Array();
window.onload=function() {
 radBtns1 = document.getElementsByName("q1");
}
var radBtns2 = new Array();
window.onload=function() {
 radBtns2 = document.getElementsByName("q2");
}
var radBtns3 = new Array();
window.onload=function() {
 radBtns3 = document.getElementsByName("q3");
}
var radBtns4 = new Array();
window.onload=function() {
 radBtns4 = document.getElementsByName("q4");
}
var radBtns5 = new Array();
window.onload=function() {
 radBtns5 = document.getElementsByName("q5");
}
var radBtns6 = new Array();
window.onload=function() {
 radBtns6 = document.getElementsByName("q6");
}
var radBtns7 = new Array();
window.onload=function() {
 radBtns7 = document.getElementsByName("q7");
}
var radBtns8 = new Array();
window.onload=function() {
 radBtns8 = document.getElementsByName("q8");
}
var radBtns9 = new Array();
window.onload=function() {
 radBtns9 = document.getElementsByName("q9");
}
var radBtns10 = new Array();
window.onload=function() {
 radBtns10 = document.getElementsByName("q10");
}
//  End --> 
</script>
</head>
<body>

<p>Chose correct answer<br /></p>

<form action=""> 
<ol>
<li>The ACE Company has five plants nationwide that cost $100 million. The current market value of the plants is $500 million. The plants will be recorded and reported as assets at 

  <p><input type="radio" name="q1" value="$100 million."/>$100 million.<br /> 
  <input type="radio" name="q1" value="$400 million."/>$400 million.<br /> 
  <input type="radio" name="q1" value="$500 million."/>$500 million.<br /> 
  <input type="radio" name="q1" value="$600 million."/>$600 million.<br /></p>
</li> 

<li>Liabilities

  <p><input type="radio" name="q2" value="are future economic benefits."/>are future economic benefits.<br /> 
  <input type="radio" name="q2" value="are existing debts and obligations."/>are existing debts and obligations.<br /> 
  <input type="radio" name="q2" value="possess service potential."/>possess service potential.<br /> 
  <input type="radio" name="q2" value="are things of value used by the business in its operation."/>are things of value used by the business in its operation.<br /></p> 
</li> 

<li>If total liabilities decreased by $15,000 and owner’s equity increased by $5,000 during a period of time, then total assets must change by what amount and direction during that same period?

  <p><input type="radio" name="q3" value="$20,000 increase."/>$20,000 increase.<br /> 
  <input type="radio" name="q3" value="$10,000 decrease."/>$10,000 decrease.<br /> 
  <input type="radio" name="q3" value="$10,000 increase."/>$10,000 increase.<br /> 
  <input type="radio" name="q3" value="$15,000 decrease."/>$15,000 decrease.<br /> </p></li> 

<li>If total liabilities decreased by $15,000 and owner’s equity decreased by $5,000 during a period of time, then total assets must change by what amount and direction during that same period?

  <p><input type="radio" name="q4" value="$20,000 increase."/>$20,000 increase.<br /> 
  <input type="radio" name="q4" value="$10,000 increase."/>$10,000 increase.<br /> 
  <input type="radio" name="q4" value="$20,000 decrease."/>$20,000 decrease.<br /> 
  <input type="radio" name="q4" value="$10,000 decrease."/>$10,000 decrease.<br /> 
</p></li> 

<li>If total liabilities increased by $14,000 during a period of time and owner’s equity decreased by $6,000 during the same period, then the amount and direction (increase or decrease) of the period’s change in total assets is a(n)


  <p><input type="radio" name="q5" value="$14,000 increase."/>$14,000 increase.<br /> 
  <input type="radio" name="q5" value="$20,000 increase."/>$20,000 increase.<br /> 
  <input type="radio" name="q5" value="$8,000 decrease."/>$8,000 decrease.<br /> 
  <input type="radio" name="q5" value="$8,000 increase."/>$8,000 increase.<br /> </p>
 </li>

<li>Transactions that can be measured in dollars and cents are recorded in the financial information system.
  <p><input type="radio" name="q6" value="True"/>True<br />  
  <input type="radio" name="q6" value="False"/>False<br /></p>
 </li>

<li>Bookkeeping and accounting are one and the same because the bookkeeping function includes the accounting process.
  <p><input type="radio" name="q7" value="True"/>True<br />  
  <input type="radio" name="q7" value="False"/>False<br /></p>
 </li>

<li>In the owner's equity statement, revenues are listed first, followed by expenses, and net income (or net loss).
  <p><input type="radio" name="q8" value="True"/>True<br />  
  <input type="radio" name="q8" value="False"/>False<br /></p>
 </li>

<li>Net income for the period is determined by subtracting total expenses and drawings from total revenues.
  <p><input type="radio" name="q9" value="True"/>True<br />  
  <input type="radio" name="q9" value="False"/>False<br /></p>
 </li>

<li>The basic accounting equation states that Assets = Liabilities + Owner’s Equity
  <p><input type="radio" name="q10" value="True"/>True<br />  
  <input type="radio" name="q10" value="False"/>False<br /><br /> <br />
 

<strong>Fill in the Blank</strong><br /></p>
</li>

<li><p>Owner's equity is decreased by <input type="text" name="q10" id="q11" /> .<br/></p>
</li>

<li><p>Liabilities of a company are owed to <input type="text" name="q12" id="q12" /> .<br/></p>
</li>

<li><p>Accountants refer to an economic event as a <input type="text" name="q13" id="q13" /> .<br/></p>
</li>

<li><p>A private accountant can perform many activities in a business organization but would not work in <input type="text" name="q14" id="q14" /> .<br/></p>
</li>

<li><p>Keeping a systematic, chronological diary of events that are measured in dollars and cents is called <input type="text" name="q2" id="q15" /> .<br/></p>
</li>


</ol>
<p><input type="button" value="Get score" onclick="valid()"/> 
<input type="reset" value="Clear answers"/></p> 
 

</form> 
 
</body>
</html>

EDIT: Please start putting your code examples inside of bbcode tags - the “<>” or “Select Syntax” for HTML
Some members won’t bother to read code that’s harder to read and I can’t be depended upon to continue doing it for you :wink:

I modify in code and give me result wrong but its don’t know it’s place

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<title> Quiz 1</title>
<script type="text/javascript">

function valid() {
var cor = "0" ;
var incor = "0";
for(var i=0; i < radBtns1.length; i++) {
            if(radBtns1[i].checked) {
                 var test0 = radBtns1[i].value;
                                   }     
                                            }
for(var i=0; i < radBtns2.length; i++) {
            if(radBtns2[i].checked) {
                 var test1 = radBtns2[i].value;
                                   }     
                                            }
for(var i=0; i < radBtns3.length; i++) {
            if(radBtns3[i].checked) {
                 var test2 = radBtns3[i].value;
                                   }     
                                            }
for(var i=0; i < radBtns4.length; i++) {
            if(radBtns4[i].checked) {
                 var test3 = radBtns4[i].value;
                                   }     
                                            }
for(var i=0; i < radBtns5.length; i++) {
            if(radBtns5[i].checked) {
                 var test4 = radBtns5[i].value;
                                   }     
                                            }
for(var i=0; i < radBtns6.length; i++) {
            if(radBtns6[i].checked) {
                 var test5 = radBtns6[i].value;
                                   }     
                                            }
for(var i=0; i < radBtns7.length; i++) {
            if(radBtns7[i].checked) {
                 var test6 = radBtns7[i].value;
                                   }     
                                            }
for(var i=0; i < radBtns8.length; i++) {
            if(radBtns8[i].checked) {
                 var test7 = radBtns8[i].value;
                                   }     
                                            }
for(var i=0; i < radBtns9.length; i++) {
            if(radBtns9[i].checked) {
                 var test8 = radBtns9[i].value;
                                   }     
                                            }
for(var i=0; i < radBtns10.length; i++) {
            if(radBtns10[i].checked) {
                 var test9 = radBtns10[i].value;
                                   }     
                                            }
test10 = document.getElementById("q11").value;
test11 = document.getElementById("q12").value;
test12 = document.getElementById("q13").value;
test13 = document.getElementById("q14").value;
test14 = document.getElementById("q15").value;



if (test0 == "$400 million.") {
++cor; }
else ++incor;
if (test1 == "are existing debts and obligations.") {
++cor; }
else ++incor;
if (test2 == "$10,000 decrease.") {
++cor; }
else ++incor ;
if (test3 == "$20,000 decrease.") {
++cor; }
else ++incor ;
if (test4 == "8000 increase") {
++cor; }
else ++incor;
if (test5 == "True") {
++cor; }
else ++incor;
if (test6 == "False") {
++cor; }
else ++incor;
if (test7 == "False") {
++cor; }
else ++incor;
if (test8 == "False") {
++cor; }
else ++incor;
if (test9 == "True") {
++cor; }
else ++incor;
if (test10.toLowerCase() == "expenses") {
++cor; }
else ++incor;
if (test11.toLowerCase() == "creditors") {
++cor; }
else ++incor;
if (test12.toLowerCase() == "transaction") {
++cor; }
else ++incor;
if (test13.toLowerCase() == "external auditing") {
++cor; }
else ++incor;
if (test14.toLowerCase() == "recording") {
++cor; }
else ++incor;
alert("you got " + cor + " right" );
} 
var radBtns1 = new Array();
window.onload=function() {
 radBtns1 = document.getElementsByName("q1");
}
var radBtns2 = new Array();
window.onload=function() {
 radBtns2 = document.getElementsByName("q2");
}
var radBtns3 = new Array();
window.onload=function() {
 radBtns3 = document.getElementsByName("q3");
}
var radBtns4 = new Array();
window.onload=function() {
 radBtns4 = document.getElementsByName("q4");
}
var radBtns5 = new Array();
window.onload=function() {
 radBtns5 = document.getElementsByName("q5");
}
var radBtns6 = new Array();
window.onload=function() {
 radBtns6 = document.getElementsByName("q6");
}
var radBtns7 = new Array();
window.onload=function() {
 radBtns7 = document.getElementsByName("q7");
}
var radBtns8 = new Array();
window.onload=function() {
 radBtns8 = document.getElementsByName("q8");
}
var radBtns9 = new Array();
window.onload=function() {
 radBtns9 = document.getElementsByName("q9");
}
var radBtns10 = new Array();
window.onload=function() {
 radBtns10 = document.getElementsByName("q10");
}
//  End --> 
</script>
</head>
<body>

<p>Chose correct answer<br /></p>

<form action=""> 
<ol>
<li>The ACE Company has five plants nationwide that cost $100 million. The current market value of the plants is $500 million. The plants will be recorded and reported as assets at 

  <p><input type="radio" name="q1" value="$100 million."/>$100 million.<br /> 
  <input type="radio" name="q1" value="$400 million."/>$400 million.<br /> 
  <input type="radio" name="q1" value="$500 million."/>$500 million.<br /> 
  <input type="radio" name="q1" value="$600 million."/>$600 million.<br /></p>
</li> 

<li>Liabilities

  <p><input type="radio" name="q2" value="are future economic benefits."/>are future economic benefits.<br /> 
  <input type="radio" name="q2" value="are existing debts and obligations."/>are existing debts and obligations.<br /> 
  <input type="radio" name="q2" value="possess service potential."/>possess service potential.<br /> 
  <input type="radio" name="q2" value="are things of value used by the business in its operation."/>are things of value used by the business in its operation.<br /></p> 
</li> 

<li>If total liabilities decreased by $15,000 and owner’s equity increased by $5,000 during a period of time, then total assets must change by what amount and direction during that same period?

  <p><input type="radio" name="q3" value="$20,000 increase."/>$20,000 increase.<br /> 
  <input type="radio" name="q3" value="$10,000 decrease."/>$10,000 decrease.<br /> 
  <input type="radio" name="q3" value="$10,000 increase."/>$10,000 increase.<br /> 
  <input type="radio" name="q3" value="$15,000 decrease."/>$15,000 decrease.<br /> </p></li> 

<li>If total liabilities decreased by $15,000 and owner’s equity decreased by $5,000 during a period of time, then total assets must change by what amount and direction during that same period?

  <p><input type="radio" name="q4" value="$20,000 increase."/>$20,000 increase.<br /> 
  <input type="radio" name="q4" value="$10,000 increase."/>$10,000 increase.<br /> 
  <input type="radio" name="q4" value="$20,000 decrease."/>$20,000 decrease.<br /> 
  <input type="radio" name="q4" value="$10,000 decrease."/>$10,000 decrease.<br /> 
</p></li> 

<li>If total liabilities increased by $14,000 during a period of time and owner’s equity decreased by $6,000 during the same period, then the amount and direction (increase or decrease) of the period’s change in total assets is a(n)


  <p><input type="radio" name="q5" value="$14,000 increase."/>$14,000 increase.<br /> 
  <input type="radio" name="q5" value="$20,000 increase."/>$20,000 increase.<br /> 
  <input type="radio" name="q5" value="$8,000 decrease."/>$8,000 decrease.<br /> 
  <input type="radio" name="q5" value="8000 increase"/>$8,000 increase.<br /> </p>
 </li>

<li>Transactions that can be measured in dollars and cents are recorded in the financial information system.
  <p><input type="radio" name="q6" value="True"/>True<br />  
  <input type="radio" name="q6" value="False"/>False<br /></p>
 </li>

<li>Bookkeeping and accounting are one and the same because the bookkeeping function includes the accounting process.
    <p><input type="radio" name="q7" value="True"/>True<br />  
       <input type="radio" name="q7" value="False"/>False<br /></p>
</li>

<li>In the owner's equity statement, revenues are listed first, followed by expenses, and net income (or net loss).
  <p><input type="radio" name="q8" value="True"/>True<br />  
  <input type="radio" name="q8" value="False"/>False<br /></p>
 </li>

<li>Net income for the period is determined by subtracting total expenses and drawings from total revenues.
  <p><input type="radio" name="q9" value="True"/>True<br />  
  <input type="radio" name="q9" value="False"/>False<br /></p>
 </li>

<li>The basic accounting equation states that Assets = Liabilities + Owner’s Equity
  <p><input type="radio" name="q10" value="True"/>True<br />  
  <input type="radio" name="q10" value="False"/>False<br /><br /> <br />
 

<strong>Fill in the Blank</strong><br /></p>
</li>

<li><p>Owner's equity is decreased by <input type="text" name="q10" id="q11" /> .<br/></p>
</li>

<li><p>Liabilities of a company are owed to <input type="text" name="q12" id="q12" /> .<br/></p>
</li>

<li><p>Accountants refer to an economic event as a <input type="text" name="q13" id="q13" /> .<br/></p>
</li>

<li><p>A private accountant can perform many activities in a business organization but would not work in <input type="text" name="q14" id="q14" /> .<br/></p>
</li>

<li><p>Keeping a systematic, chronological diary of events that are measured in dollars and cents is called <input type="text" name="q2" id="q15" /> .<br/></p>
</li>


</ol>
<p><input type="button" value="Get score" onclick="valid()"/> 
<input type="reset" value="Clear answers"/></p> 
 

</form> 
 
</body>
</html>