Home Web Front-end JS Tutorial How to display single options in WeChat mini program

How to display single options in WeChat mini program

Jun 21, 2018 pm 04:24 PM
Radio WeChat applet

This article mainly introduces the use of radio display single option function in WeChat applet, involving operation techniques related to radio component event response, and comes with source code for readers to download and refer to. Friends in need can refer to this article

The example describes how the WeChat applet uses radio to display a single option function. Share it with everyone for your reference, as follows:

Key code

① index.wxml

1

2

3

4

5

6

<radio-group bindchange="radiogroupBindchange">

 <radio value="radio1">radio1</radio>

 <radio value="radio2">radio2</radio>

 <radio value="radio3">radio3</radio>

</radio-group>

<view>提示:{{text}}</view>

Copy after login

② index.js

1

2

3

4

5

6

7

8

9

10

11

12

Page({

 data:{

  // text:"这是一个页面"

  text:''

 },

 radiogroupBindchange:function(e){

  console.log(e);

  this.setData({

   text:'您选择了'+e.detail.value

  })

 }

})

Copy after login

The above is what I compiled for everyone. I hope it will be helpful to everyone in the future.

Related articles:

How to develop AngularJS 2 applications using the VS Code editor

About SPA first screen loading optimization in Vue (Detailed tutorial)

About the usage of the pipe operator (|) in Angular

About modifying the selected text or code in the VS Code editor Color operation

How to use the request network to perform request operations in the WeChat applet

How to implement the array update function in VUE

Using modular development in vuejs

What should we pay attention to when optimizing Vue projects?

How to implement component communication in vue-cli

Use angular to write the Message component

How to bind Json data source using EasyUI

The above is the detailed content of How to display single options in WeChat mini program. For more information, please follow other related articles on the PHP Chinese website!

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

Hot Article Tags

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Xianyu WeChat mini program officially launched Xianyu WeChat mini program officially launched Feb 10, 2024 pm 10:39 PM

Xianyu WeChat mini program officially launched

What is the name of Xianyu WeChat applet? What is the name of Xianyu WeChat applet? Feb 27, 2024 pm 01:11 PM

What is the name of Xianyu WeChat applet?

WeChat applet implements image upload function WeChat applet implements image upload function Nov 21, 2023 am 09:08 AM

WeChat applet implements image upload function

How to use PHP to develop the second-hand transaction function of WeChat applet? How to use PHP to develop the second-hand transaction function of WeChat applet? Oct 27, 2023 pm 05:15 PM

How to use PHP to develop the second-hand transaction function of WeChat applet?

Use WeChat applet to achieve carousel switching effect Use WeChat applet to achieve carousel switching effect Nov 21, 2023 pm 05:59 PM

Use WeChat applet to achieve carousel switching effect

Implement the drop-down menu effect in WeChat applet Implement the drop-down menu effect in WeChat applet Nov 21, 2023 pm 03:03 PM

Implement the drop-down menu effect in WeChat applet

Implement image filter effects in WeChat mini programs Implement image filter effects in WeChat mini programs Nov 21, 2023 pm 06:22 PM

Implement image filter effects in WeChat mini programs

Implement image rotation effect in WeChat applet Implement image rotation effect in WeChat applet Nov 21, 2023 am 08:26 AM

Implement image rotation effect in WeChat applet

See all articles