现在的句子
var myname=null;
myDListener = new Object();
myDListener.change = function(jjl) {
myname = jjl.target.selectedItem.对讲机编号;
//获得组件选项 属性值
mydata=new LoadVars();
submitUrl="http://localhost/3DPreview2/manage8.asp?PhoneNum="+myname;
replydata=new LoadVars();
replydata.onLoad=handleReply;
mydata.sendAndLoad(submitUrl,replydata,"post");
function handleReply(success){
if(success){
//trace(PhoneNum);
txtp.text="该用户的详细信息如下:\n";
txtp.text+="属于组编号:"+replydata.GroupId+newline;
txtp.text+="组类别:"+replydata.GroupName+newline;
txtp.text+="默认频道:"+replydata.DefaultChannel+newline;
txtp.text+="公共频道:"+replydata.CommonChannel+newline;
txtp.text+="监听频道:"+replydata.ListenChannel+newline;
www.text="该用户同组的人员为:\n";
www.text+=replydata.tongzu;
}
else
{
txtp.text="没有收到数据";
}
}
};
以前的句子
myDListener = new Object();
myDListener.change = function(jjl) {
var myname = jjl.target.selectedItem.对讲机编号;
//获得组件选项 属性值
mydata=new LoadVars();
submitUrl="http://localhost/3DPreview2/manage8.asp?PhoneNum="+myname;
replydata=new LoadVars();
replydata.onLoad=handleReply;
mydata.sendAndLoad(submitUrl,replydata,"post");
function handleReply(success){
if(success){
//trace(PhoneNum);
txtp.text="该用户的详细信息如下:\n";
txtp.text+="属于组编号:"+replydata.GroupId+newline;
txtp.text+="组类别:"+replydata.GroupName+newline;
txtp.text+="默认频道:"+replydata.DefaultChannel+newline;
txtp.text+="公共频道:"+replydata.CommonChannel+newline;
txtp.text+="监听频道:"+replydata.ListenChannel+newline;
www.text="该用户同组的人员为:\n";
www.text+=replydata.tongzu;
}
else
{
txtp.text="没有收到数据";
}
}
};
以前的myname值不能在外边被调用,现在可以了。就是因为一个变量作用域的问题。
举个例子:
int i=5;
void off{
int i;
i=3
}
print i;
如果这样写的话,i=5,如果如下面所写
int i=5;
void off{
i=3
}
print i;
i=3
var myname=null;
myDListener = new Object();
myDListener.change = function(jjl) {
myname = jjl.target.selectedItem.对讲机编号;
//获得组件选项 属性值
mydata=new LoadVars();
submitUrl="http://localhost/3DPreview2/manage8.asp?PhoneNum="+myname;
replydata=new LoadVars();
replydata.onLoad=handleReply;
mydata.sendAndLoad(submitUrl,replydata,"post");
function handleReply(success){
if(success){
//trace(PhoneNum);
txtp.text="该用户的详细信息如下:\n";
txtp.text+="属于组编号:"+replydata.GroupId+newline;
txtp.text+="组类别:"+replydata.GroupName+newline;
txtp.text+="默认频道:"+replydata.DefaultChannel+newline;
txtp.text+="公共频道:"+replydata.CommonChannel+newline;
txtp.text+="监听频道:"+replydata.ListenChannel+newline;
www.text="该用户同组的人员为:\n";
www.text+=replydata.tongzu;
}
else
{
txtp.text="没有收到数据";
}
}
};
以前的句子
myDListener = new Object();
myDListener.change = function(jjl) {
var myname = jjl.target.selectedItem.对讲机编号;
//获得组件选项 属性值
mydata=new LoadVars();
submitUrl="http://localhost/3DPreview2/manage8.asp?PhoneNum="+myname;
replydata=new LoadVars();
replydata.onLoad=handleReply;
mydata.sendAndLoad(submitUrl,replydata,"post");
function handleReply(success){
if(success){
//trace(PhoneNum);
txtp.text="该用户的详细信息如下:\n";
txtp.text+="属于组编号:"+replydata.GroupId+newline;
txtp.text+="组类别:"+replydata.GroupName+newline;
txtp.text+="默认频道:"+replydata.DefaultChannel+newline;
txtp.text+="公共频道:"+replydata.CommonChannel+newline;
txtp.text+="监听频道:"+replydata.ListenChannel+newline;
www.text="该用户同组的人员为:\n";
www.text+=replydata.tongzu;
}
else
{
txtp.text="没有收到数据";
}
}
};
以前的myname值不能在外边被调用,现在可以了。就是因为一个变量作用域的问题。
举个例子:
int i=5;
void off{
int i;
i=3
}
print i;
如果这样写的话,i=5,如果如下面所写
int i=5;
void off{
i=3
}
print i;
i=3
回复Comments
{commenttime}{commentauthor}
{CommentUrl}
{commentcontent}