2013年1月6日 星期日

[Javascript] iframe(child) and its parent

//--- parent to child

// get child's object
$('#childId').contents().find('childObjectSelector')


//--- child to parent

// call the method defined in parent.
parent.methodInParent();

// get parent's object
$('parentObjectSelector', window.parent.document);


沒有留言:

張貼留言