html防止单选按钮刷新恢复,如何用Javascript处理HTML单选按钮?

Algebra Reviewer

h2

{

color: white;

font-family: verdana;

text-shadow: black 0.1em 0.1em 0.2em;

text-align: center;

}

table

{

font-family:verdana;

color: white;

text-shadow: black 0.1em 0.1em 0.2em;

}

function question1()

{

if ("quiz.question1.value=='d'")

{

alert ("That's the correct answer!");

}

else

{

alert ("Oops! try again!");

}

}

Here are 10 items for you to answer. You might need scratch paper- so get one before taking this reviewer.

  1. What is the equation of the line passing through point (3,8) and parallel to the line x - 3y = 5 ?

y = 1/3 x + 5

y = 3x + 7

y = 3/5 x + 3

y = 1/3 x + 7

这里的答案应该是第4个单选按钮,但我认为if/else声明是错误的。如何用Javascript处理HTML单选按钮?

+1

使用[验证器](http://validator.w3.org)并停止使用laout表。 –

+1

请[学会爱标签](http://www.456bereastreet.com/archive/200711/use_the_label_element_to_make_your_html_forms_accessible/) –

+2

完全无关,但我认为服务器应验证正确的答案,而不是javascript。如果你不这么做,那么你的学生很容易就会在源代码html代码中寻找答案。 –

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值