2010-05-31 63 views

回答

1

By,AJAX我假设你的意思是JavaScript。

嗯,你可以使用这样的事情:

<html> 
<head> 
<title>Form Example</title> 

<script type="text/javascript"> 
window.onload = function() 
{ 
    document.myform.mytext.value = "TEXTBOX"; 
} 
</script> 

</head> 
<body> 

<form name="myform" method="get"> 
<input type="text" name="mytext" /> 
</form> 

</body> 
</html> 

说明:

一旦文档已完成加载脚本查找名为 “myForm会” 的形式。然后它会在此表单中查找名为“mytext”的元素,然后您可以设置/更改value属性的值。

+0

谢谢你,它运作良好。 – kawtousse 2010-06-01 09:05:06