开发者

Jquery Iframe textbox

开发者 https://www.devze.com 2022-12-29 12:42 出处:网络
I am new to Jquery, In fact, I have 0 knowledge using JQuery. I am trying to get something to work using JQuery.

I am new to Jquery, In fact, I have 0 knowledge using JQuery. I am trying to get something to work using JQuery.

I have a html page with an iframe. T开发者_StackOverflow中文版he iframe page has a form in it and a textbox in it. The Iframe is actually created by another jquery function and is inside a div.

Now, when I click a link on the main page, I want the textbox in the iframe to be populated with some value. Is it possible to get this to work?

<html>
....
...
<a click="populate()">Populate IFrame</a>
....
...
<div id="iframediv"></div>
...

...


Something like this should work:

$('iframe').contents().find('#mytextbox').val("myvalue");
0

精彩评论

暂无评论...
验证码 换一张
取 消