当前位置: 代码迷 >> ASP.NET >> 解释js代码解决思路
  详细解决方案

解释js代码解决思路

热度:9933   发布时间:2013-02-25 00:00:00.0
解释js代码
<script>alert('新增成功!');
  window.dialogArguments.aspnetForm.ctl00_MainContent_TxtCJBM.value 
  =燃料车间,皮带班,电工班,机械班,推煤机班;
  + window.dialogArguments.aspnetForm.ctl00_MainContent_hidt_sp.value 
  = DEP6d77a565-8716-4305-9130-1ae6f9dd356c,DEPf0bd4b99-b8eb-4170-bcae-0bd476383847,
  DEP5305c291-846d-48a3-8920-2a761bcf776c,DEPb85d50a4-7e99-4816-8469-dde37320bab2,
  DEPfc722a2d-9cb6-4c4a-bf12-e8db3c7aac2d;window.close();</script>


重点是这个 window.dialogArguments 他起一个返回值的效果 ?


------解决方案--------------------------------------------------------
dialogArguments只能在mode和modeless窗口中才能使用,可以传递传递任意类型的值
------解决方案--------------------------------------------------------
楼主这里有解释,挺好的
------解决方案--------------------------------------------------------
window.showModalDialog( url, x);

window.dialogArguments就代表这里的x参数

一般可以是
window.showModalDialog( url, window);

window.showModalDialog( url, window.document);

等对象都可以传
  相关解决方案