web_reg_find()查询信息为变量
Action()
{
char *str1;//=(char*)malloc(20);
char str2[10];
web_url("toLoginPage",
"URL={Url}/login",
"TargetFrame=",
"Resource=0",
"RecContentType=text/html",
"Referer={Url}/index",
"Snapshot=t3.inf",
"Mode=HTML",
EXTRARES,
"Url=/images/sprites_login.png", ENDITEM,
"Url=/images/login_ico.jpg", ENDITEM,
LAST);
lr_start_transaction("立刻登录");
web_submit_data("login.action",
"Action={Url}/login/userLogin",
"Method=POST",
"TargetFrame=",
"RecContentType=text/json",
"Referer={Url}/toLoginPage",
"Snapshot=t5.inf",
"Mode=HTML",
ITEMDATA,
"Name=userName", "Value={username}", ENDITEM,
"Name=password", "Value={password}", ENDITEM,
"Name=autosession", "Value=false", ENDITEM,
"Name=verify", "Value=请输入验证码", ENDITEM,
"Name=_GLOBAL_SESSION_DUPLICATE_SWITCH", "Value=true", ENDITEM,
"Name=_GLOBAL_REQUEST_DUPLICATE_KEY", "Value={duplicate_key}", ENDITEM,
//关联信息 "Value=eecf72ec-c866-4beb-8d96-b04215ecd72a"
"Name=_GLOBAL_SUBMIT_TYPE_KEY", "Value=ajax", ENDITEM,
LAST);
str1=lr_eval_string("{username}");
strncpy(str2,str1,3);
lr_output_message("str2= %s",str2);
lr_save_string(str2,"str_name");
web_reg_find("Fail=NotFound","Search=All",
"SaveCount=Counts",
"Text={str_name}**!",
LAST);
web_url("index",
"URL={Url_1}/index",
"Resource=0",
"RecContentType=text/html",
"Referer=",
"Snapshot=t78.inf",
"Mode=HTML",
LAST);
lr_output_message("user:%s",lr_eval_string("{username}"));
lr_end_transaction("立刻登录",LR_AUTO);
return 0;
}
郑重声明:本站内容如果来自互联网及其他传播媒体,其版权均属原媒体及文章作者所有。转载目的在于传递更多信息及用于网络分享,并不代表本站赞同其观点和对其真实性负责,也不构成任何其他建议。