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获取元素标签id的问题,高分求教 〓〓大家来看看这个金额格式化方法???〓〓 JavaScript中调用函数的括号问题 是谁说prototype.js(prototype-1.4.0)是好东西的//我用了一下,快气死了。。 调用js文件出错! 效果我只要对第一个链结生效,如何设? 一个简单的问题 ~~~在线等待 我这个onblur事件为什么不能触发? form 的action问题 Array Of Byte 类型的一个问题? 导航菜单点击后,被选中项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>