Create a gist now

Instantly share code, notes, and snippets.

TitaniumMobileでWebViewを使う方法
var WebView = function() {
// window
var win = Ti.UI.createWindow();
// view
var view = Ti.UI.createView();
// webview
var webview = Ti.UI.createWebView();
webview.url = 'http://www.google.co.jp/';
// loadイベント
webview.addEventListener('load', function(e) {
Ti.API.log('loaded');
// ここでHTMLを改変!
webview.evalJS('document.getElementById("lst-ib").value = "ひささん";');
});
view.add(webview);
win.add(view);
return win;
}
module.exports = WebView;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment