单击单选按钮进行付款流程
大家好,目前正在使用我自己的网站。我的网站运行良好,我想在我的网站中添加一些内容。在付款过程中,我创建了 3 个按钮,客户在填写表格后需要选择付款按钮,三个按钮将具有不同的值,即英镑 £ 3 £ 5.5 和 £ 9
..一旦客户单击购物车,付款金额将自动显示之后在左侧显示当客户单击该单选按钮时,应通过单击任一单选按钮将付款金额添加到该金额中。 请检查我的网站 amd 请点击解锁页面
请任何人说出正确的答案适合它的代码..plz
hi guys presently am working with my own website.. my web site works fine i want to add something in my website. in payment process i have created 3 buttons, customers after fill that forms they need to choose the payment button three button will has a different values ie pounds £ 3 £ 5.5 and £ 9
.. once customer click the cart the payment amount will be automatically display on left side after that when customer clicking that radio button that payment amount should be added with that amount by clicking any one of radio button ..
kindly check my website amd plz click unlock page
plz can any one say the correct code which will be suitable with it..plz
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果我没理解错的话,您想要显示单选按钮,单击该按钮后,会在网站右侧的框中(解锁页面)显示定义的值。
如果是这样,您必须定义单选按钮:
更改名称和 ID,如果您希望预先检查则添加检查;并在其之前或之后修改要添加的文本。然后,添加一个
onclick
事件来加载如下内容:并为可能的值添加一个数组;
添加所需数量的数组,并在每个
nText[]
的引号内写入选择每个单选按钮后要显示的内容。完成此操作后,您应该使用直接将
textDiv
(或任何您想要的内容)打印到 html 页面。代码> 左右。这应该可以做到,即使您可能需要稍微更改它,因为我将其用于
If I'm getting you right, you want to show radio buttons that will, once clicked, show a defined value on the box at the right at your website (unlock page).
If that's so, you'll have to define radio buttons:
Change name and id, add checked if you want it to be pre-checked; and modify the text that you want to add, before or after itself. Then, add an
onclick
event to load something like this:And add an array for that possible values;
Add as many arrays you need, and inside that inverted commas from each
nText[]
write what you want to show once each radio is selected. Once done that, you should print thetextDiv
(or whatever you want to), directly to the html page with<div id='textDiv'></div>
or so.That should make it, even thought you might have to change it slightly as I'm using this for
<select>
instead of direct inputs andonchange
events instead ofonclick
, and I've changed it on-the-fly. Good luck.