ajax改变文本框的值
处理响应回来的内容的时候:
function checkCallBack(){
if(xmlHttp.readyState==4){
if(xmlHttp.status==200){
var result = xmlHttp.responseText;
var info=document.getElementById("info2").value;
info.innerHTML=result;
}
}
}
其他的传值都没有问题,我只是想改变id为info2的text的值;如何实现???
请教,谢谢!!!!
function checkCallBack(){
if(xmlHttp.readyState==4){
if(xmlHttp.status==200){
var result = xmlHttp.responseText;
var info=document.getElementById("info2").value;
info.value=result;
}
}
}
JScript code:
function checkCallBack(){
if(xmlHttp.readyState==4){
if(xmlHttp.status==200){
var result = xmlHttp.responseText;
var info=document.getElementById("info2");
info.value=result;
}
}
}
解决了!!
相关问答:
查看源文件时出来的
<script type="text/javascript">
// <![CDATA[
Sys.Application.initialize();
Sys.Application.add_init(function() {
$create(Sys.UI._Upd ......
<div id="div6" runat="server" style= "height:auto;width:auto; text-align: left;">
& ......
http://localhost:8080/xx/zz.do 显示 out的 xml 数据
xml.open("GET",arguments[0],true);// arguments[0]是 /xx/zz.do
xml.send();
alert(arguments[0]);//这边有
x ......
HTML code:
<script type="text/javascript">
<!--
var time = 0;
var http_request=null;
function HttpRequest(){
if (window.ActiveXObject){
......
我用Ajax+struts1.3做了一个省市级联菜单,结果出现的情况是——省份这个下拉菜单里面都显示中文,而城市这个下拉菜单里面都显示乱码。
由于代码太长所以不太好列出来,不知道怎么办才好啊
UTF-8 GB ......