dxhshitc 你好,
1.在 Firefox 添加事件 和 IE 有所不同,请参考下面代码:- <script language="javascript" type="text/javascript">
- window.onload = function () {
- var spread1 = document.getElementById("<%=FpSpread1.ClientID %>");
- if (document.all)
- {
- // IE
- if (spread1.addEventListener)
- {
- // IE9
- spread1.addEventListener("DataChanged", dataChanged, false);
- }
- else
- {
- // Other versions of IE and IE9 quirks mode (no doctype set)
- spread1.onDataChanged = dataChanged;
- }
- }
- else
- {
- // Firefox
- spread1.addEventListener("DataChanged", dataChanged, false);
- }
- }
- function dataChanged() {
- alert("the data has changed!");
- }
- </script>
复制代码 |