- 主题:哪位帮看看一个Javascript的问题,初学.谢谢了(懂了^^)
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
<title>无标题页</title>
</head>
<body>
<form id="form1" >
<div id="div1">
<input type="button" id="button1" value="确定" onclick="javascript:GetValue()"/>
<input type="text" id="TB1" name="TB1" value="tb1" />
</div>
</form>
<script language="javascript" type="text/javascript">
function GetValue()
{
alert("Test");
document.forms[0].TB1.Value="已经改变";
}
</script>
</body>
</html>
-----------------------------------
问题:为什么我按了按钮文本框的值不改变...
应该如何修改呢?谢谢
-------------------------------------
谢谢shaolin和virsir,哈哈
--
修改:vcpshine FROM 218.249.29.*
FROM 218.249.29.*
Value--> value
【 在 vcpshine (CADILLAC) 的大作中提到: 】
: <html xmlns="http://www.w3.org/1999/xhtml" >
: <head>
: <title>无标题页</title>
: ...................
--
FROM 211.100.227.*
document.forms[0].TB1.value="已经改变";
Value - > value
【 在 vcpshine (CADILLAC) 的大作中提到: 】
: <html xmlns="http://www.w3.org/1999/xhtml" >
: <head>
: <title>无标题页</title>
: ...................
--
FROM 123.117.78.*
谢谢,真迅速!
^^
又被这个大小写害死了...
【 在 shaolin (叶孤城|漫漫当爹路) 的大作中提到: 】
: Value--> value
--
FROM 218.249.29.*