javascript - How do I make the action of my form the src of my iframe -


  & lt; form id = "submit" action = "" method = "post" & gt;   

IFrame के स्रोत के लिए डेटा सबमिट करने के लिए मुझे अपने फॉर्म की आवश्यकता है। यूजर एक्शन के आधार पर यह एसआरसी लगातार बदलता रहता है।

  & lt; iframe id = "iframe" src = "math_iframe.php" width = "100%" height = "100%" & gt; & lt ; / iframe & gt;   

इसलिए मैं इसे

  & lt; form id = "submit" action = "& lt; iframe src =" math_iframe.php जैसा कुछ करना चाहता हूं "" विधि = "पोस्ट" & gt;   

कृपया ध्यान दें: मुझे मौजूदा पृष्ठ पर रहने की इच्छा है।

jQuery का उपयोग करें:

  $ ('# submit')। पर ('सबमिट', फ़ंक्शन (e) {$ (this) .attr ('action', $ ('# iframe')। attr ('src'));});   

डेमो:

Comments

Popular posts from this blog

Verilog Error: output or inout port "Q" must be connected to a structural net expression -

jasper reports - How to center align barcode using jasperreports and barcode4j -

c# - ASP.NET MVC - Attaching an entity of type 'MODELNAME' failed because another entity of the same type already has the same primary key value -