这篇文章主要介绍了PHP在弹框中获取foreach中遍历的id值并传递给地址栏的相关资料,需要的朋友可以参考下
1.php有时候我们需要再弹框中获取foreach中遍历的数据(例如id),在弹框中点击按钮并传递给地址栏跳转。那么应该怎么做呢。
2. 点击取现按钮,如果没有设置密码->弹框

3. 点击去设置,把用户名通过地址栏传递给别的页面。

4.使用onclick事件,把参数charge传递给function函数。function为弹窗函数。

5. 把username值传递过来。并给“去设置”赋值herf属性。

6.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | <p class = "mask" ></p>
<p class = "mess" >
<p style= "text-align:left;height:50px;line-height:50px;background-color:#3399CC" >
<span style= "padding-left:10px;display:block;font-size:18px;" >提示<img class = "close_window" src= "/images/back_img/close.png" style= "height:25px;float:right;display:inline-block;cursor:pointer;margin-top:12px;margin-right:10px;" ></span>
</p>
<p style= "width:100%;height:50px;line-height:50px;font-size:17px;margin-top:10px;" >
<span>该借款人未设置交易密码,请设置交易密码后取现</span>
</p>
<p style= "height:100px;width:100%;margin-top:20px;text-align:center;" >
<p>
<a style= "width:122px;height:42px;line-height:42px;background-color:#1D8CBC;color:#FFF;display:inline-block;cursor:pointer;border-radius:4px;text-align:center;margin-left:180px;" class = "btn1" >
<span >去设置</span>
</a>
</p>
</p>
</p>
|
Salin selepas log masuk
Atas ialah kandungan terperinci PHP在弹框中怎样才能获取foreach中遍历的id值再传递给地址栏的方法介绍. Untuk maklumat lanjut, sila ikut artikel berkaitan lain di laman web China PHP!