在云那方

首页 新随笔 联系 订阅 管理

<!--以下为一个ocx控件-->
<object
       id="gridStaff"
       classid="clsid:8A663037-8430-4393-8280-647DC9087B50"
       name= "devread"
       codebase="<%=request.getContextPath()%>/ocx/TableListX.ocx#version=1,0,0,5"
       width=100%
       height=210
       align=center
       hspace=0
       vspace=0 >
 </object>
       下面js方法页面可以进行事件调用,在页面中调出的控件在这里可以通过它的ID直接点出他的控件属性和方法,对控件对象进行操作。


<script type="text/javascript">
function tableInfo(){
    try{
           devread.DelAllSelectedData();//设置控件
           alllist=document.getElementById("slist").value;
           devread.AddData(alllist);  
     }
    catch(ex){
          alert("tableInfo: "+ex.description);
     }
}

function call(AID,AName)
{
    alert(AID+AName);
}
</script>

<!-- 定义OnCall事件对应的Script方法 -->
<SCRIPT type="text/javascript" FOR="devread" EVENT="OnCall(AID,AName)" >
   <!-- insert script commands -->
   call(AID,AName);
</SCRIPT>

 

posted on 2011-01-14 15:50  Rich.T  阅读(3758)  评论(0编辑  收藏  举报