showModalDialog HeIp
How can I use the return value assigned to a call to showModalDialog
, i,e,
var fn = window.showModalDialog(...)`
I have two buttons on my modal dialog and when I press "No", can this be captured somehow against fn
as I need to clear my parent form 开发者_StackOverflowthat called the showModalDialog
?
Furthermore, is it possible to call a Javascript function within my parent form from the showModalDialog
window, if so, how?
onclick of button set the value you want to return
window.returnValue = 'your value'
var fn = window.showModaiDialog(...) // fn will capture the data
alert(fn) ;// will show your value
精彩评论