查询乌鲁木齐到北京的车票的时候 出现了 有票 我就点击订购 顺手看了 一下代码,呵呵。看了一下,用的是jquery1.4.2,还有jquery-ui-1.8.2, jquery-easyui1.0.5,还有dhtmlxgrid" 呵呵。
下面的html代码是 订票按钮的代码,还有一些 调用js的代码片段 呵呵。
//购票主方法
//参数格式:#号分隔
function
getSelected(
selectStr) {
var
selectStr_arr =
selectStr.
split(
"#");
var
station_train_code=
selectStr_arr[
0];
var
lishi=
selectStr_arr[
1];
var
starttime=
selectStr_arr[
2];
var
trainno=
selectStr_arr[
3];
var
from_station_telecode=
selectStr_arr[
4];
var
to_station_telecode=
selectStr_arr[
5];
var
arrive_time=
selectStr_arr[
6];
var
from_station_name=
selectStr_arr[
7];
var
to_station_name=
selectStr_arr[
8];
var
ypInfoDetail=
selectStr_arr[
9];
var
flag =
true;
if (
checkBeyondMixTicketNum()) {
flag =
false;
return;
}
// 该方法在各个页面中分别书写,因为根据页面的不同行为不同,相当于重写
if (
flag) {
submitRequest(
station_train_code,
lishi,
starttime,
trainno,
from_station_telecode,
to_station_telecode,
arrive_time,
from_station_name,
to_station_name,
ypInfoDetail);
}
}
//发送购票请求开始
function
submitRequest(
station_train_code,
lishi,
starttime,
trainno,
from_station_telecode,
to_station_telecode,
arrive_time,
from_station_name,
to_station_name,
ypInfoDetail) {
$(
'#station_train_code').
val(
station_train_code);
$(
'#lishi').
val(
lishi);
$(
'#train_start_time').
val(
starttime);
$(
'#trainno').
val(
trainno);
$(
'#from_station_telecode').
val(
from_station_telecode);
$(
'#to_station_telecode').
val(
to_station_telecode);
$(
'#arrive_time').
val(
arrive_time);
$(
'#from_station_name').
val(
from_station_name);
$(
'#to_station_name').
val(
to_station_name);
$(
'#ypInfoDetail').
val(
ypInfoDetail);
$(
'#orderForm').
attr(
"action",
ctx+
"/order/querySingleAction.do?method=submutOrderRequest");
$(
'#orderForm').
submit();
}
不知道能不能有谁写个 订票器 之类的东西