zoukankan      html  css  js  c++  java
  • 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;
    }

  • 相关阅读:
    (6)Lua 模块与包
    (3)Lua 迭代器与迭代函数
    (二)miller指导查看主控板寄存器操作
    (一)mtg3000常见操作
    (三)NAND flash和NOR flash的区别详解
    (八)shell中的循环结构
    (七)shell编程学习
    (六)动手写第一个shell
    (五)uboot移植补基础之shell
    (四)ubuntu学习前传—uboot中对Flash和DDR的管理
  • 原文地址:https://www.cnblogs.com/bingpoli/p/4286080.html
Copyright © 2011-2022 走看看