大神来帮忙,菜鸟遇到的一个低级问题
javascript吧
全部回复
仅看楼主
level 3
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><title>无标题文档</title><script language="javascript" type="text/javascript">function validate(form) {var returnValue = ture;var selectedOption = form.selCards.selectedIndex;if (selectedOption==0)returnValue = false{alert("Please select a suit of cards.");}return returnValue;}</script></head>
<body><form name="frmCards" action="" method="get" onsubmit="return validate(this)"><select name="selCards" id="selCards"><option>Select a suit of cards</option><option value="hearts">Hearts</option><option value="diamonds">Diamonds</option><option value="spades">Spades</option><option value="clubs">Clubs</option></select><input type="submit" value="Send selection" /></form></body></html>
2013年06月09日 00点06分 1
level 3
请问这个函数怎么调用不起来,完全按书上的格式写的,在DW里面编辑,但是在网页端打开没有效果,想问问哪里编辑的不对。或者请高手留个QQ,有问题可以向您请教。
我完全是初学,很多东西不懂,谢谢!!!
2013年06月09日 00点06分 3
level 13
var returnValue = ture;写错啦; 是 true
2013年06月09日 01点06分 4
实在太感谢了,这么个小小的错误,搞了半天[呵呵]
2013年06月09日 02点06分
[汗] 眼真毒
2013年06月09日 04点06分
回复 メ绝対嗳上伱 :这个说明写代码,真的是马虎不得啊
2013年06月09日 05点06分
1