How to access iframe element in jQuery?

Forums jQueryHow to access iframe element in jQuery?
Staff asked 2 years ago

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

Answers (1)

Add Answer
Staff answered 2 years 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