如何将下拉列表与描述框链接。 [英] How to link drop-down with description box.

查看:73
本文介绍了如何将下拉列表与描述框链接。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试创建一个带有小描述的下拉框。当选择下拉列表中的项目时,描述框必须给出描述。所以我面临的问题是在这里我不知道如何正确地将这两者连接在一起我现在能够显示下拉物品但我在描述框的链接中失败了,所以请帮我链接掉 - 每个选择的下来和描述。



我尝试过:

Im trying to create a drop-down box with a small description. When a item from the drop-down is select, the description box must give a description of it. So the problem I face is here I don't know how to link these two together properly as of now Im able to display the drop down with items but I failed in the link of description box, so please help me in linking the drop-down and description for each selection being made.

What I have tried:

推荐答案

试试这个



try this

<!DOCTYPE html>
<html lang="en">
<head>
    <script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular.min.js"></script>
    <script>
        var app = angular.module('myapp', []);
        app.controller('myctrl', myfun);
        function myfun(


scope){


scope.description = ' ';
scope.description = '';


这篇关于如何将下拉列表与描述框链接。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆