- 论坛徽章:
- 0
|
- #!/bin/bash
- #
- display()
- {
- conpage/jimmyget.cgi [color=Red]flightNbrDt [/color]| awk -F "" '/^Data!/ { printf \
- "document.fm1.mawb.options[document.fm1.mawb.length] = new Option(\"%s\", \"%s\");\n", $2, $2 }'
- }
- getFlightNbrDt()
- {
- conpage/jimmyget2.cgi|awk -F "" '/^Data!/ {printf \
- "<option value=%s%s>%s%s</option>\n",$2,$3,$2,$3}'
- }
- getShipmentOid()
- {
- conpage/jimmyget3.cgi|awk -F "" '/^Data!/ { printf \
- "document.fm1.shipoid.options[document.fm1.shipoid.length] = new Option(\"%s\", \"%s\");\n", $2, $2 }'
- }
- cat <<__EOF__
- Content-type: text/html; charset=GB2313
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
- <title>Customer Profile</title>
- <script LANGUAGE="JavaScript">
- function getAWB()
- {
- var flightNbrDt = document.fm1.flightNbrDt.value;
- alert (flightNbrDt );
- document.fm1.mawb.length = 0;
- __EOF__
- display
- cat <<__EOF__
- }
- ...
- <form name = "fm1">
- <select name="flightNbrDt" onChange="getAWB()" class="inputnormal">
- <option value=070726CA969>CA969</option>
- <option value=070726CA968>CA968</option>
- <option value=070726CA967>CA967</option>
- </select>
- </form>
- ...
- __EOF__
复制代码
我想在 call getAWB() 之后, 先得到用户选择的日期还有航班的值,
然后再call jimmyget.cgi的时候, 把这个值作为 $1 (或者别的方式) 的参数传进去,
再cgi里面需要这个参数作查询
请问,如何把这个javascript 变量,应用在shell里面 |
|