2013-09-25 2 views
0

나는 User : PostureOfLearning에서 제안한 단계를 수행하고 아래에 붙여 넣은 테스트 코드를 제안했습니다. Chrome에서는 잘 작동하지만 IE에서는 그렇지 않습니다. IE에서 코드가 작동하도록 변경해야하는 경우 미리 알려주세요. 미리 감사드립니다. , 속성 또는 메서드를 지원하지 않습니다 객체 'handsontable' test1.html : 잘못된 문자 jquery.handsontable.full.js, 줄 1 개 문자 1 SCRIPT438 : 내가 무엇입니까Handsontable 구현

<html> 
<head> 
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> 
<script src="jquery.js" type="text/javascript"></script> 
<script src="jquery.plugin.js" type="text/javascript"></script> 
<script src="custom.js" type="text/javascript"></script> 
<script src="C:\wamp\www\rrr\bin\jquery-handsontable-master\dist_wc\x-handsontable\jquery.handsontable.full.js"></script> 
<link rel="stylesheet" media="screen" href="C:\wamp\www\rrr\bin\jquery-handsontable-master\dist_wc\x-handsontable\jquery.handsontable.full.css"> 
</head> 
<body> 
<div id="handsontableDivID"> 
<script> 
    var data = [ 
    ["", "Maserati", "Mazda", "Mercedes", "Mini", "Mitsubishi"], 
    ["2009", 0, 2941, 4303, 354, 5814], 
    ["2010", 5, 2905, 2867, 412, 5284], 
    ["2011", 4, 2517, 4822, 552, 6127], 
    ["2012", 2, 2422, 5399, 776, 4151] 
      ]; 
    var config = { 
    data: data, 
    minRows: 5, 
    minCols: 6, 
    minSpareRows: 1, 
    autoWrapRow: true, 
    colHeaders: true, 
    contextMenu: true 
    }; 
    $("#handsontableDivID").handsontable(config); 
    </script> 
    </body> 
    </html> 

오류는 SCRIPT1014 있습니다 line 32 character 1

+0

http://handsontable.com/demo/ajax.html 기존의 URL ("JSON/load.json") 및 다른 URL에 저장 ("에서 데이터를 읽는의 예를 보여줍니다 json/save.json ") – alxndr

답변

0

웹 사이트 솔루션에 zip 파일의 압축을 풀었으며 jQuery도 설치했다고 가정합니다.

웹 페이지에서 추출한 js 파일을 가리키는 스크립트를 추가해야합니다. 뭔가 같은 :

<script src="~/js/Handsontable/jquery.handsontable.js"></script> 

그리고 스타일 추가 :

var config = {} //Any config would be done here 
$("#handsontableDivID").handsontable(config); //this initializes the table 

이 handsontable에서 데이터를 얻을하고 다시 서버로 보내려면 :

vara data = $("#handsontableDivID").handsontable('getInstance').getData(); 

<link href="~/css/jquery.handsontable.css" rel="stylesheet" /> 

그리고 몇 가지 예제 JS

예제를 통해 살펴 보겠습니다. 의합니다 :

http://handsontable.com/index.html

+0

답변 해 주셔서 감사합니다. 제안 된 단계를 수행하고 진행 방법을 알려 드리겠습니다. – user2791530

+0

편집을 보시기 바랍니다. 감사합니다. – user2791530

+0

@ user2791530 js 파일을 '찾지 못하는 것 같습니다. 'src = "C : ..."'에서 'src = "/ rrr/..."'로 변경하십시오. – PostureOfLearning