简体   繁体   中英

titanium open new url

I would like to open a new url in the default browser when the user clicks on an image. I have looked into the Titanium.Platform.openURL but don't know how to use it.

any help is appreciated

Ti.Platform.openURL("http://m.google.com"); //replace string lit with your url

您只需将要在click事件上打开的URL作为openUrl的参数传递

确保链接前面有“http://”,否则它将无法执行任何操作

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM