开发者

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
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜