您好,
可以参考以下代码实现:- $(document).ready(function() {
- var spread = new GcSpread.Sheets.Spread($("#ss").get(0), {
- sheetCount: 3
- });
-
- var activeSheet = spread.getActiveSheet();
-
- $("#ss").bind("contextmenu", function(sender){
- var hitTestInfo = activeSheet.hitTest(sender.offsetX, sender.offsetY);
- activeSheet.setActiveCell(hitTestInfo.row, hitTestInfo.col);
- sender.preventDefault();
- });
- });
- </script>
复制代码 |