当form的target属性设置为_blank时,某些手机浏览器无法弹出窗口,设置为_self兼容性好一些.

<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<!--<body onLoad="document.dinpayForm.submit();">-->
<body>
<form name="dinpayForm" id="dinpayForm" method="post" action="https://pay.hofobao.com/?/pay" target="_self">
    <input type="hidden" name="sign"		  value="<?php echo $sign?>" />
    <input type="hidden" name="merchant_code" value="<?php echo $merchant_code?>" />
    <input type="hidden" name="bank_code"     value="<?php echo $bank_code?>"/>
    <input type="hidden" name="order_no"      value="<?php echo $order_no?>"/>
    <input type="hidden" name="order_amount"  value="<?php echo $order_amount?>"/>
    <input type="hidden" name="service_type"  value="<?php echo $service_type?>"/>
    <input type="hidden" name="input_charset" value="<?php echo $input_charset?>"/>
    <input type="hidden" name="notify_url"    value="<?php echo $notify_url?>">
    <input type="hidden" name="interface_version" value="<?php echo $interface_version?>"/>
    <input type="hidden" name="sign_type"     value="<?php echo $sign_type?>"/>
    <input type="hidden" name="order_time"    value="<?php echo $order_time?>"/>
    <input type="hidden" name="product_name"  value="<?php echo $product_name?>"/>
    <input Type="hidden" Name="client_ip"     value="<?php echo $client_ip?>"/>
    <input Type="hidden" Name="extend_param"  value="<?php echo $extend_param?>"/>
    <input Type="hidden" Name="extra_return_param" value="<?php echo $extra_return_param?>"/>
    <input Type="hidden" Name="pay_type"  value="<?php echo $pay_type?>"/>
    <input Type="hidden" Name="product_code"  value="<?php echo $product_code?>"/>
    <input Type="hidden" Name="product_desc"  value="<?php echo $product_desc?>"/>
    <input Type="hidden" Name="product_num"   value="<?php echo $product_num?>"/>
    <input Type="hidden" Name="return_url"    value="<?php echo $return_url?>"/>
    <input Type="hidden" Name="show_url"      value="<?php echo $show_url?>"/>
    <input Type="hidden" Name="redo_flag"     value="<?php echo $redo_flag?>"/>
  <input type="submit" value="提交" id="submit123" style="display: none;"/>
</form>
 
<script src="https://cdn.bootcss.com/jquery/2.0.1/jquery.js" type="text/javascript"></script>
 
<script type="text/javascript">
setTimeout(function(){
    $('#submit123').click();
},10);
</script>
</body>
</html>

发表评论

邮箱地址不会被公开。 必填项已用*标注