How to access iframe element in jQuery?

Forums jQueryHow to access iframe element in jQuery?
Staff asked 1 month ago

I want to get or update text box value from the iframe.

Answers (1)

Add Answer
Staff answered 1 month ago

You can access the iframe or its content below,

var iframe = $($(document).find("#iframe")[0]).contents();
$(iframe).find("#txtuser").val("test")

 

Subscribe

Select Categories