php 和html怎么实现,点击支付按钮,弹出支付成功的弹窗,然后后台数据库也更改支付状态?

html-css040

php 和html怎么实现,点击支付按钮,弹出支付成功的弹窗,然后后台数据库也更改支付状态?,第1张

点击支付按钮,直接弹出支付成功弹窗吗?

那么可以写成ajax请求,后台接收到参数之后,进行数据库的插入,然后返回给前台。

前台收到返回值之后,进行弹窗即可,弹窗可以简单设置成div显示即可。

<style>

select

{

background-color:#ad3db1

color:#000000

width:150px

}

</style>

<select name=selzd onchange=text() align=center>

<option>--选择支付类型--</option>

<option>--直接支付--</option>

<option>--保证金支付--</option>

</select>

<br>

<select name=selfd align=center>

</select>

<script>

var zj_pay=new Array("支付成功","支付中","支付失败")

var bzj_pay=new Array("保证金冻结","发出货物","验货确认","支付货款","支付中","支付失败","订单关闭")

function text()

{

selfd.options.length=0

if(selzd.selectedIndex==1)

{

var l=zj_pay.length

for(i=0i<li++)

{

x=document.createElement("<option>")

x.innerHTML=zj_pay

selfd.insertBefore(x)

}

}

if(selzd.selectedIndex==2)

{

var l=bzj_pay.length

for(i=0i<li++)

{

x=document.createElement("<option>")

x.innerHTML=bzj_pay

selfd.insertBefore(x)

}

}

}

</script>哈哈 刚好写过这么个东西用js写的 应该能满足你的要求很容易改的 不懂得还可以问我给分吧 HOHO