alert对话框弹不出来,求解啊 htmljavascript 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 ReferenceError: getResult is not defined function getResult(id){alert(document.getElementById(id).value);}怎么没有定义啊 你把 <script language="text/javascript"> 换成 <script type="text/javascript"> 试试 把 <script language="text/javascript"> 换成 <script type="text/javascript">还是不行啊 <!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>function getResult(id){alert(document.getElementById(id).value);}</script></head><body><table><tr><td>请输入操作数:</td><td><input type="text" id="text1"></td></tr><tr><td></td><td><input type="button" id="radio1" value="确定" onclick="getResult('text1')"/></td></tr></table></body></html> 在把 onclick="getResult("text1")" 里面text1 用单引 帮忙给调试一下js,另求教调试工具和方法,书籍! 求教:JS调整tr顺序的问题 有几个字符串,怎样随机的组织它们? 360,IE6.0,FF 问题 HTML格式的邮件中调用Javascript 通过ajax 读取xml后 用js生成树 jquery.autocomplete.min.js怎么实现动态数据 帮个忙! 关于JQUERY在IE6下的bug问题 有关js实现下拉框 导航菜单点击后,被选中项css变化 求代码 jQuery怎么扩展方法...类似c#静态类那样的
{
alert(document.getElementById(id).value);
}
怎么没有定义啊
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
<script>
function getResult(id)
{
alert(document.getElementById(id).value);
}
</script>
</head><body>
<table>
<tr>
<td>请输入操作数:</td>
<td><input type="text" id="text1"></td>
</tr><tr>
<td></td>
<td>
<input type="button" id="radio1" value="确定" onclick="getResult('text1')"/>
</td>
</tr>
</table>
</body>
</html>