下拉是在选择和其他列表之间添加空间。 [英] Dropdown is adding space betweek select and other list.

查看:46
本文介绍了下拉是在选择和其他列表之间添加空间。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我添加级联下拉菜单



一次下调更改它反映其他。



但输出是就像我打开下拉值一样。

如何在选择和用户名之间删除这个空格。



选择

//下拉空间我不知道为什么。

jaydeep

Rishi

neha



我尝试过:



 PageMethods.userlist($('option:selected') ,这).val(),函数(结果){
$(#UserList)。empty();
$(#UserList)。append($(< option> +'select'+< option />));
for(i = 0; i< result.length; i ++){
$(#UserList)。append ($(< option value =+ result [i] .RC_UserID +>+ result [i] .Username +< / option>));

}
});

解决方案

('option:selected',this).val(),function(result){

( #的UserList)空();

( #的UserList)附加(

i add cascading dropdown

one drop down change it's reflect other.

but output is coming like whn i appen dropdown value.
how can i remove this space between select and username.

Select
// space in dropdown i dont know why.
jaydeep
Rishi
neha

What I have tried:

PageMethods.userlist($('option:selected', this).val(), function (result) {
           $("#UserList").empty();
           $("#UserList").append($("<option>" + 'select' + "<option/>"));
           for (i = 0; i < result.length; i++) {
               $("#UserList").append($("<option value=" + result[i].RC_UserID + "> " + result[i].Username + " </option>"));

           }
       });

解决方案

('option:selected', this).val(), function (result) {


("#UserList").empty();


("#UserList").append(


这篇关于下拉是在选择和其他列表之间添加空间。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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