js刷新窗口 (父窗口


<script type="text/javascript">
function queding() {
	//alert(111);
	var times=$("input[name='time']").val();
	var gongsi=$("input[name='gongsi']").val();
	var danhao=$("input[name='danhao']").val();
	var ord_id=$("input[name='ord_id']").val();
	$.ajax({
        type:"post",
        url:"{:U('ajaxlog')}",
        //async:true,
        //dataType:"json",
        data:{
            'time':times,
			'gongsi':gongsi,
			'danhao':danhao,
			'ord_id':ord_id,
			//'state':state
			
        },
        success:function(date){
			//var times=$("input[name='time']").val();
			//alert(times);
			//var gongsi=$("input[name='gongsi']").val();
			//var danhao=$("input[name='danhao']").val();
			//var act_shopidtable="【待签收】</br>";
			//act_shopidtable +="【出库信息】出库时间"+times+"</br>";
			//act_shopidtable +="【物流信息】发货日期:"+times+"       物流公司:"+gongsi+"        物流单号:"+danhao

			//$("#act_shopidtable", opener.document);
			self.opener.location.reload(); //----------------------------关闭前,刷新父窗口<pre name="code" class="javascript">                       //location.replace(location) ;
window.close(); } });}

js刷新窗口 (点确定后的当前窗口)

function cancelorder(order_id,ordtype){
				//alert(order_id);
					$.ajax({ 
					type:'post',
					url: "{:U('cancelorder')}", 
					data:"ordtype="+ordtype+"&ord_id="+order_id,
					success: function(msg){
						
						if(msg){
							var str='<a href="index.php?s=/addon/WeiSite/userinfo/orderlist/id/'+order_id+'/type/1/ordertype/'+ordtype+'" class="order_bt_2 pull-right">还要买</a> <div class="clearfix"></div>';
							$('#href_'+order_id).html(str);
						}
						
						alert("取消成功");  //给出提示,点确定后,刷新当前窗口
						location.reload();
						
						
					}
				});
			}





本文转载:CSDN博客