javascript无法运行,是什么回事?代码如下

来源:百度知道 编辑:UC知道 时间:2024/05/27 07:04:48
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title>
<script language="javascript">
function myfun()
{
if(document.myform.name.value=="")
{
alert("请填写姓名");
return;
};
var xl=document.myform.xueli.value;
alert(xl);
if(xl=="")
{
alert("请选择学历");
return;
}
else
{
if(xl==1)
var c="您的学历是大学";
if(xl==2)
var c="您的学历是高中";
if(xl==3)
var c="您的学历是初中";
document.write("您的详

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>阳光上的桥祝你心情愉快</title>
<script language="javascript">
function myfun()
{
if(document.myform.name.value=="")
{
alert("请填写姓名");
return;
};
var xl=document.myform.xueli;
var c='';
if(xl[0].checked) c="您的学历是大学";
else if(xl[1].checked) c="您的学历是高中";
else if(xl[2].checked) c="您的学历是初中";
else{
alert("请选择学历");
return;
}
document.write("您的详细信息\n您的姓名是:"+document.myform.name.value+"<br>"+c)
}