javascript this 的问题
来源:百度知道 编辑:UC知道 时间:2024/05/29 06:58:19
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE> New Document </TITLE>
<script language="javascript">
function processData(form)
{
for (var i=0;i<form.Beatles.length;i++)
{
if(form.Beatles[i].checked)
{
break;
}
}
var beatle=form.Beatles[i].value
// var song=form.song.value
alert("chenking whether features"+beatle+"`````");
}
</script>
</HEAD>
<BODY >
<form onsubmit="return false">
<input type="radio" name="beatles" checked value="1"> 1
<input type="radio" name="beatles">2
<input type="radio" name="beatles">3
<input type="radio" name=&qu
<HTML>
<HEAD>
<TITLE> New Document </TITLE>
<script language="javascript">
function processData(form)
{
for (var i=0;i<form.Beatles.length;i++)
{
if(form.Beatles[i].checked)
{
break;
}
}
var beatle=form.Beatles[i].value
// var song=form.song.value
alert("chenking whether features"+beatle+"`````");
}
</script>
</HEAD>
<BODY >
<form onsubmit="return false">
<input type="radio" name="beatles" checked value="1"> 1
<input type="radio" name="beatles">2
<input type="radio" name="beatles">3
<input type="radio" name=&qu
form.Beatles[i] 改为 form.beatles[i], 你的js代码中有3个地方要改。
this的意思是指对象本身。在这里
<input type="button" name="process" value="提交" onClick="processData(this.form)">
this就是指这个button。
你想实现什么功能
javascript this 的问题
关于javascript中this相关的问题
javascript:void(0) 和this.form.submit()的问题
javascript的构造函数中,【var pointer = this;】是什么意思?
javascript中setTimeout和clearTimeout和this这三个关键字的是什么意思?
能给我讲讲javascript中this关键字的用法嘛 谢谢!
请问If you're seeing this message, you need to enable JavaScript 怎么解决
JavaScript中this指针有什么作用?能具体说明一下吗?
描述JAVASCRIPT中对象的构造方法及THIS关键字的作用
javascript