单击单选按钮进行付款流程

发布于 2024-10-09 06:54:13 字数 322 浏览 0 评论 0原文

大家好,目前正在使用我自己的网站。我的网站运行良好,我想在我的网站中添加一些内容。在付款过程中,我创建了 3 个按钮,客户在填写表格后需要选择付款按钮,三个按钮将具有不同的值,即英镑 £ 3 £ 5.5 和 £ 9

..一旦客户单击购物车,付款金额将自动显示之后在左侧显示当客户单击该单选按钮时,应通过单击任一单选按钮将付款金额添加到该金额中。 请检查我的网站 amd 请点击解锁页面

http://spsmobile.co.uk

请任何人说出正确的答案适合它的代码..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

http://spsmobile.co.uk

plz can any one say the correct code which will be suitable with it..plz

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

不即不离 2024-10-16 06:54:13

如果我没理解错的话,您想要显示单选按钮,单击该按钮后,会在网站右侧的框中(解锁页面)显示定义的值。

如果是这样,您必须定义单选按钮:

<input type="radio" name="" id="" value="1" onclick="showText(this)" />Text

更改名称和 ID,如果您希望预先检查则添加检查;并在其之前或之后修改要添加的文本。然后,添加一个 onclick 事件来加载如下内容:

        function showText(isList){
            txtIndex = isList.selectedIndex;
            document.getElementById('textDiv').innerHTML = nText[txtIndex];
        }

并为可能的值添加一个数组;

        var nText = new Array()
        nText[1] = "";
        nText[2] = "";

添加所需数量的数组,并在每个 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:

<input type="radio" name="" id="" value="1" onclick="showText(this)" />Text

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:

        function showText(isList){
            txtIndex = isList.selectedIndex;
            document.getElementById('textDiv').innerHTML = nText[txtIndex];
        }

And add an array for that possible values;

        var nText = new Array()
        nText[1] = "";
        nText[2] = "";

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 the textDiv (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 and onchange events instead of onclick, and I've changed it on-the-fly. Good luck.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文