Home  >  Article  >  Web Front-end  >  How to jump to the browser in uniapp

How to jump to the browser in uniapp

coldplay.xixi
coldplay.xixiOriginal
2020-12-14 11:13:019413browse

Uniapp implements the method of jumping to the browser: 1. Directly fill in the jump address, the code is [plus.runtime.openUrl('jump address')]; 2. Set with [http ://], the code is [plus.runtime.openURL('http://' ur].

How to jump to the browser in uniapp

The operating environment of this tutorial: windows7 system, uni -app2.5.1 version, thinkpad t480 computer.

Recommended (free): uni-app development tutorial

Methods for uniapp to jump to the browser:

One: Directly fill in the jump address

plus.runtime.openUrl('跳转的地址')

Two: Convert the address to one without Chinese

var urlStr = encodeURI(url)
 
 plus.runtime.openUrl('跳转的地址')

Three: Need to have http://

plus.runtime.openURL('http://' + urlStr);

Related free learning recommendations: php programming (video)

The above is the detailed content of How to jump to the browser in uniapp. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn