Code example for JsPromptResult

Methods: cancel

0
				result.confirm(et.getText().toString());
			} 
		}).setNeutralButton("取消", new OnClickListener() {
			@Override 
			public void onClick(DialogInterface dialog, int which) {
				result.cancel();
			} 
		}); 
 
		// 屏蔽keycode等于84之类的按键,避免按键后导致对话框消息而页面无法再弹出对话框的问题 
		builder.setOnKeyListener(new OnKeyListener() {
			@Override 
			public boolean onKey(DialogInterface dialog, int keyCode,
					KeyEvent event) {
				//Log.v("onJsPrompt", "keyCode==" + keyCode + "event=" + event); 
				return true; 
			} 
		}); 
 
		// 禁止响应按back键的事件 
		// builder.setCancelable(false);