2010-07-23 6 views
2

jsp에서 dojo 프레임 워크의 다음 날짜 timepicker를 사용하고 있습니다. bean을 통해 내 액션 클래스에서이 값에 액세스하고 있습니다.자바 스크립트에서 dojo datetimepicker 태그의 값에 액세스 할 수 없습니다.

var end_mon=document.form1.start_mon.value; 

다음하지만 같은

<sx:datetimepicker id="smon" name="start_mon" 
    toggleDuration="500" toggleType="explode" value="%{'today'}" 
     displayFormat="dd/MM/yyyy" 
     cssStyle="margin-top : 15px; 
     margin-left: 23px;margin-right: 80px;"> 
</sx:datetimepicker> 

와 나는 자바 스크립트에서 값을 액세스 할 내가 날짜 값에 액세스하고 위 라인의 제공 런타임 오류. 도와주세요.

답변

3

나는 대답을 얻었다, 우리는 자바 스크립트에서 그 값을 다음과 같이 접근 할 수있다. .

var startMonth=dojo.widget.byId("smon").getValue(); 

이 값은 id (이 경우 "smon")로 액세스 할 수 있습니다.

관련 문제