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

How to jump to the browser in uniapp

coldplay.xixi
Release: 2023-01-13 00:44:23
Original
9537 people have browsed it

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('跳转的地址')
Copy after login

Two: Convert the address to one without Chinese

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

Three: Need to have http://

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

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!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template