<select name="rpLevel" class="form-control {validate:{required:true}}""> <option value>请选择</ option> <option value="1">国家级</ option><option value="2">市级</ option><option value=""3">集团级</ option><i select> 通过关联的方式对以上进行参数化:使用关联函数web_reg_save_param_regexp()获取所有奖励级别,参数名称为rpLevelAll;使用lr_paramarr_random()函数从所有奖励级别中随机获取其中一个值,通过lr_save_string()函数保存为参数rpLevel,两步操作使用一行代码完成。 将完成后的代码补充在以下的代码内: lr_think_time(11); //集合点 lr_rendezvous("R_REW"); //事务点 lr_start_transaction("T_REW"); //检查点 web_reg_find("Text=OK",LAST); web_submit_data("save_2", "Action=http://localhost:9000/suthr/hrteacher/rewards/0/save", "Method=POST", "RecContentType=text/plain", "Referer=http://localhost:9000/suthr/hrteacher/rewards/0/add", "Snapshot=t18.inf", "Mode=HTML", ITEMDATA, "Name=saveBtnType", "Value=", ENDITEM, "Name=teacherId", "Value=6", ENDITEM, "Name=rpLevel", "Value=1", ENDITEM, "Name=rpTitle", "Value={rpTitle}", ENDITEM, "Name=rpDate", "Value=2023-06-01", ENDITEM, "Name=rCompany", "Value=FJDW{rCompany}", ENDITEM, "Name=memo", "Value=", ENDITEM, LAST); lr_end_transaction("T_REW", LR_AUTO);
时间: 2023-07-24 17:17:16 浏览: 152
lr_think_time(11);
//集合点
lr_rendezvous("R_REW");
//事务点
lr_start_transaction("T_REW");
//检查点
web_reg_find("Text=OK",LAST);
web_reg_save_param_regexp("ParamName=rpLevelAll","RegExp=<option value=\"(.*?)\">(.*?)</option>", "Ordinal=all", LAST);
lr_paramarr_random("rpLevelAll", "randRpLevel");
lr_save_string(lr_eval_string("{randRpLevel}"), "rpLevel");
web_submit_data("save_2",
"Action=http://localhost:9000/suthr/hrteacher/rewards/0/save",
"Method=POST",
"RecContentType=text/plain",
"Referer=http://localhost:9000/suthr/hrteacher/rewards/0/add",
"Snapshot=t18.inf",
"Mode=HTML",
ITEMDATA,
"Name=saveBtnType", "Value=",
ENDITEM,
"Name=teacherId", "Value=6",
ENDITEM,
"Name=rpLevel", "Value={rpLevel}",
ENDITEM,
"Name=rpTitle", "Value={rpTitle}",
ENDITEM,
"Name=rpDate", "Value=2023-06-01",
ENDITEM,
"Name=rCompany", "Value=FJDW{rCompany}",
ENDITEM,
"Name=memo", "Value=",
ENDITEM,
LAST);
lr_end_transaction("T_REW", LR_AUTO);
阅读全文