- 11-10 18:57
- Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1)
-
阿海
创业起步
头衔 --
帅哥 来自 幻想第五季
积分 310 威望 72
07-05-15 加入联盟
-
请问大家,这段简单网页代码错到底在哪里???
前两天突发奇想,用VBScript编了一小段简单的网页代码,运行时,却屡试屡败!查相关书籍,也没发现哪里有错,难道是该语言语法有新的改变,现在看的我头都大了…… 请个位帮忙给检查、修改一下~
原代码如下:
<html>
<head>
<script language="VBScript">
<!--
Sub bchange(choice)
If choice=1
Then
document.bgcolor="yellow"
Elseif choice=2
Then
document.fgcolor="blue"
Elseif choice=3
Then
document.bgcolor="pink"
Elseif choice=4
Then
document.fgcolor="red"
Elseif choice=5
Then
document.bgcolor="green"
Elseif
document.fgcolor="black"
End If
End Sub
-->
</script>
</head>
<body>
<center>
<h2><font color=#ff0000>文字与背景颜色的搭配</font></h2>
<p>
<table border=4 color=yellow>
<tr><th>背景颜色<th>选择<th>文字颜色<th>选择</tr>
<tr><td>黄色<td><input type=radio onClick="``bchange(1)"><td>蓝色<td><input type=radio onClick="bchange(2)"></tr>
<tr><td>粉红色<td><input type=radio onClick="bchange(3)"><td>红色<td><input type=radio onClick="bchange (4)"></tr>
<tr><td>绿色<td><input type=radio onClick="bchange(5)"><td>黑色<td><input type=radio onClick="bchange(6)"></tr>
</table>
</center>
</body>
</html>
- 11-10 19:09
- Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 2.0.50727; .NET CLR 3.0.04506.30)
-
tanxin677
管理员
头衔 --
帅哥 来自 设计艺术学院
积分 1162 威望 254
07-05-09 加入联盟
-
Re:请问大家,这段简单网页代码错到底在哪里???
不懂代码~~
为什么总是无法选中?













