<!DOCTYPE > <html xmlns="http://www.w3.org/1999/xhtml" debug="true"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"> <meta name="apple-mobile-web-app-capable" content="yes"> <meta name="viewport" content="target-densitydpi=device-dpi" /> <script type="text/javascript"> function init() { var testVal = document.getElementById('mytextId').value; AndroidFunction.showToast(testVal); } </script> </head> <body> <div style="float: left;width: 50%;"> <input type="text" style="width: 180px;" name="myText" id="mytextId" /> </div> <div style="clear: both;height: 3px;"> </div> <div> <input value="submit" type="button" name="submit" id="btnSubmit" onclick="javascript:return init();" /> </div> </body> </html>