how to get value of input in modalbox

Hi dears

I am using modalbox as following

dhtmlx.modalbox({
title:“test”,
text:“文件名称:<input type=“text” id=“fileName” value=”" style=“width:200px;”>",
width:“450px”,
buttons:[“ok”, “cancel”],
callback:function(result){
//how to get fileName’s value here
}
});

thanks a lot

you can use

var box = dhtmlx.modalbox({ title:"test", text:"文件名称:<input type=\"text\" id=\"fileName\" value=\"\" style=\"width:200px;\">", width:"450px", buttons:["ok", "cancel"], callback:function(result){ var value = box.getElementsByTagName("input")[0].value; } });