赋什么值?输入框的内容? document.getElementById("a").value = ***;
解决方案 »
- 为什么要encodeURI(url)两次才不会出现乱码?
- 请各位帮忙看一下 下面写的代码哪里有问题
- ie提示缺少对象
- 急:框架内跳转到锚点的问题
- ajax status返回值 有时为12031 ,希望有大神帮我解决一下,我网站里面没有任何汉字
- *****100分!!!! 日期转换的小问题,请帮忙,顶着有分!!!!!!!!*******
- 这个程序怎么改,高分求教,成功后马上解帖
- 怎样改变listbox的样式啊
- 请大家看看这段简单程序的错误!
- 下面出错???:<input type=button name=min value=min onclick="window.moveto(1000,2000)">
- 求一个正则。关于取第3个逗号前的数据。
- 使用一段javascript对页面的表格排序,E文和数字类型的没问题,现重金悬赏中文解决方案
或document.forms[0].xxx.value;
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title>
<script language="javascript">
document.getElementById("textfield").value="ssss";</script>
</head><body>
<form name="form1" method="post" action="">
<input type="text" name="textfield">
</form>
</body>
</html>
提示:document.getelementbyid 为空或不是对象
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title></head><body>
<form name="form1" method="post" action="">
<input type="text" name="textfield">
<script language="javascript">
document.getElementById("textfield").value="ssss";</script>
</form>
</body>
</html>
再前面html还没生成,当然找不到,或写在onload函数里面
如下<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title>
<script language="javascript">
function inita()
{
document.getElementById("a").value="ssss";
}
</script>
</head><body onLoad="inita()">
<form name="form1" method="post" action="">
<input type="text" id="a" >
</form>
</body>
</html>
或<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title></head><body >
<form name="form1" method="post" action="">
<input type="text" id="a" >
<script language="javascript">
document.getElementById("a").value="ssss";
</script>
</form>
</body>
</html>
谢谢大家的关注