```
2. 調用插件 ```
//廠商視窗
$(".vendorWin").click(function(){
var sn = $('#vendor').val();//取得廠商流水號
var url = 'purchase.php?op=vendorWin&sn='+sn;
var wH = 350;
var wW = 600;
var position = $(this).offset();
var wL = position.left - wW - 300;
var wT = position.top; //
childWin(url,wH,wW,wL,wT);
});
```
3. 子視窗函數 ```
//子視窗函數
function childWin(url,wH,wW,wL,wT)
{
mywin=window.open("","","height=" + wH + ",width=" + wW + ",left="+ wL + ",top=" + wT );
mywin.location.href = url ;
}
```
4. 程式流程 ```
#----- 廠商視窗
case "vendorWin":
echo vendorWin($sn);
exit;
```
5. 程式函數
6. 傳回商品sn,由母視窗AJAX
7. 程式
流程
函數
8.