已找到解决方法,
$(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();
});
}); |