初学HTML 问个简单的问题 查找错误

下面是我写的 ,可是不知道错在那里了,它为什么没有显示啊。谢谢。
<html>

<head>

<title>selected<title>

<script language="javascript">

function show_select(form1){

if(form1.selectword.value="")

return false;
selecThing=-1;
for(i=0;i<form1.selectThing.length;i++)
{
if(form1.selectThing[i].checked)
selecThing=i;}
if(selectThing=-1)
{alert("you must choose ");
return false;}

return true;

}</script></head>

<body leftmargin=20 topmargin=100 marginwigth=20 marginheigh=100>

<img src="E:\kao.gif" alt = "欢迎" hspace=20 huspace=20 width=900 height=200>

<h1 align=center ><font size=80>show_music</font>

<br><space type=vertical size=20>

<form action="selected.cgi" method=post name="form1" onsubmit="return show_select(this)"><p align=center > <input type="text" name="selectword" size=30>

<br><input type="radio" name="selectThing" value="geshou" size=30>歌手

<input type="radio" name="selectThing" value="gequ" size=30>歌曲

<button type="submit" name="submit" value="submit" >选择

</form>

</body></html>
还有错误,二楼改的BUTTON是不是多余呢?还有,能不能改成功了写下来所有。谢谢个位。

第二个为什么多个t呢?老大,我QQ258264914可以谈下吗?谢谢。不会太麻烦的。

第三行错了,应该修改为:

<title>selected</title>

注意最后一个单词title前面要加一个/

还有下面这两个地方有错:

if(form1.selectword.value="")
if(selectThing=-1)

应该修改为双等号,并且第二个地方单词拼写错误,多了一个t,应该修改为下面这样:

if(form1.selectword.value=="")
if(selecThing==-1)

全部修改后如下:

<html>

<head>
<title>selected</title>
<script language="javascript">
function show_select(form1){
if(form1.selectword.value==""){
alert("输入内容呀! ");
return false;
}
selecThing=-1;
for(i=0;i<form1.selectThing.length;i++)
if (form1.selectThing[i].checked) selecThing=i;
if(selecThing==-1) {alert("you must choose "); return false;}
else return true;
}</script></head>

<body leftmargin=20 topmargin=100 marginwigth=20 marginheigh=100>
<img src="E:\kao.gif" alt = "欢迎" hspace=20 huspace=20 width=900 height=200>
<h1 align=center ><font size=80>show_music</font>
<br><space type=vertical size=20>
<form action="selected.cgi" method=post name="form1" onsubmit="return show_select(this)">
<p align=center > <input type="text" name="selectword" size=30>
<br><input type="radio" name="selectThing" value="geshou" size=30>歌手
<input type="radio" name="selectThing" value="gequ" size=30>歌曲
<button type="submit" name="submit" value="submit" >选择
</p></form>

</body></html>
温馨提示:答案为网友推荐,仅供参考
第1个回答  2007-10-17
补充一下:
这句<button type="submit" name="submit" value="submit" >选择
改成
<button type="submit" name="submit" value="选择" />

下面这句用相对路径
<img src="E:\kao.gif" alt = "欢迎" hspace=20 huspace=20 width=900 height=200>
相似回答