如何在codeigniter中编写支付表单的源标记代码,这是一个javascript表单

brief : I am passing $data['tabdata'] variable to view V from controller C, which contains a script element http://example.com/1.js >

issue: that script is not executing in view, basically that 1.js script contains a js form, and show a submit button.code sharing below. some pointers will help. https://docs.razorpay.com/docs/checkout-form code

 $data['tabData'] = '<html><head><meta name="viewport" content="width=device-width"></head><body>false section
<form action="/purchase" method="POST">
<!-- Note that the amount is in paise = 50 INR -->
<script
    src="https://checkout.razorpay.com/v1/checkout.js"
    data-key="<YOUR_KEY_ID>"
    data-amount="5000"
    data-buttontext="Pay with Razorpay"
    data-name="Merchant Name"
    data-description="Purchase Description"
    data-image="https://your-awesome-site.com/your_logo.jpg"
    data-prefill.name="Gaurav Kumar"
    data-prefill.email="test@test.com"
    data-theme.color="#F37254"
></script>
<input type="hidden" value="Hidden Element" name="hidden">
</form></body></html>';
      $this->load->view('tabview',$data);

When using Razorpay payment js checkout script in combination of Ajax, remember below points

1 ) Must maintain form in view only , not in result query(at least this was our case)

2) Use Manual method and post payment,capture txn id and redirect/log as per your requirement.

hope this helps!