|
ajax Response body返回值如下:
<a href="javascript:void(0)" onclick=ShowRoomOtherInfo('6daefad473ae4f9c8067b62ddf7adec5')><u>鍗曚汉鎴?/u></a></td><td align=center valign=middle class=btgry> RMB 3278</td><td align=center valign=middle class=btgry>銕?/td><td align=center valign=middle class=btgry></td><td align=center valign=middle class=btgry></td><td align=center valign=middle class=btgry><a href="javascript:void(0)" onclick="AddToOrder('2125411','PLAZA(PLAZA ROOM) 骞垮満閰掑簵锛堝箍鍦烘埧锛?,'鍗曚汉鎴?,'','','','2011-7-1,3278','2011-07-01','2011-07-02')" >
红色标示部分为要取的值
写的脚本如下:
//匹配hotelid和hotelname
web_reg_save_param_ex(
"ParamName=RoomName",
"LB=<u>",
"RB=?/u>",
SEARCH_FILTERS,
"Scope=Body",
"RequestUrl=*hotel.xxx.com/Ajax/HotelInternational.ashx*",
LAST);
web_reg_save_param_ex(
"ParamName=RoomPrice",
"LB=\'\',\'\',\'",
"RB=\'",
SEARCH_FILTERS,
"Scope=Body",
"RequestUrl=*hotel.xxx.com/Ajax/HotelInternational.ashx*",
LAST);
//酒店房型返回值
web_custom_request("HotelInternational.ashx_2",
"URL=http://hotel.xxx.com/Ajax/HotelInternational.ashx",
"Method=POST",
"Resource=0",
"RecContentType=text/plain",
"Referer=http://hotel.xxx.com/HotelInternationalDetail.aspx?strCityId={CityCode}&strInfoCode={HotelCode}&checkin={StartDay}&checkout={EndDay}",
"Snapshot=t14.inf",
"Mode=HTML",
//"Body=type=pricelist&hotelcode={HotelCode}&hotelid={hotelIDName}&checkin={StartDay}&checkout={EndDay}&cityid={CityCode}",
"Body=type=pricelist&hotelcode={HotelCode}&hotelid={HotelId}&hotelname={HotelName}&checkin={StartDay}&checkout={EndDay}&cityid={CityCode}",
LAST);
运行脚本后提示错误没找到rooname?我应该如何处理ajax返回内容中的乱码数据??能否取值后转成正常的中文显示?请高手指教 |
|