2014-11-13 4 views

답변

3

WL.SimpleDialog으로는이를 달성 할 수 없습니다. 그러나 "텍스트 상자"에 입력 필드가있는 대화 상자 (프롬프트라고 더 잘 알려진 대화 상자)가 있다면 다음 질문에 대한 나의 예를 따라갈 수 있습니다. IBM Worklight 6.1 - How to display a prompt dialog?

이 코드는 다음과 같을 수 있습니다.

navigator.notification.prompt(
     'Replace me', // message 
     onPrompt,     // callback to invoke 
     'myPrompt',   // title 
     ['Yes','No'],    // buttonLabels 
     'My default text'     // defaultText 
    ); 
} 

function onPrompt() { 
    alert("prompted"); 
} 
관련 문제