求个外部变量得function值的问题
如我的代码是这样的
var LnzID;
function popSignFlow(isLogin,LId) {
popSign(isLogin);
LnzID=LId;
document.body.style.overflow = "hidden ";
alert(LnzID);
//LnzID这值已经得到了
}
问题是,我如何把这个LnzID值赋到这以下的代码里
var sign_in_flow = ' <form action= "../222.asp?Id= '+LnzID+ ' " method= "post "> ';
------解决方案--------------------var LnzID;
function popSignFlow(isLogin,LId) {
popSign(isLogin);
LnzID=LId;
document.body.style.overflow = "hidden ";
alert(LnzID);
//LnzID这值已经得到了
}
var sign_in_flow = ' <form action= "../222.asp?Id= '+LnzID+ ' " method= "post "> ';
这样不行么
------解决方案--------------------执行顺序问题,上面那个是写在函数里的,函数要用户点 <a> 才触发,下面那个上来就执行了,这个时候用户还没点怎么能得到值,改成下面这样
var sign_in_flow = " <form name= "newForm " action=\ "../222.asp?Id= "+LnzID+ "\ " method=\ "post\ "> "
LnzID=LId;这句也要改
newForm.action= "../222.asp?Id= "+LId
还有下面的那个sign_in_flow参数没调用啊
------解决方案--------------------loadSignInFlow()没调用