2016-08-02 68 views
1

如何刪除文本和豎線

$('#cmbColumn').editableSelect(); 
 
$('#cmbSidebar').editableSelect();
<link rel="stylesheet" href="//cdn.rawgit.com/indrimuska/jquery-editable-select/master/dist/jquery-editable-select.min.css" /> 
 

 
    <script src="//code.jquery.com/jquery-1.12.4.min.js"></script> 
 
    
 
<script src="//cdn.rawgit.com/indrimuska/jquery-editable-select/master/dist/jquery-editable-select.min.js"></script> 
 

 
<!doctype html> 
 

 

 
<div class="tabs-outer"> 
 
    <div class="tabs-cap-top cap-top"> 
 
    <div class="cap-left"></div> 
 
    <div class="cap-right"></div> 
 
    </div> 
 
    <div class="fauxborder-left tabs-fauxborder-left"> 
 
    <div class="fauxborder-right tabs-fauxborder-right"></div> 
 
    <div class="region-inner tabs-inner"> 
 
     <div class="tabs section" id="main"> 
 
     <div class="widget HTML" id="HTML3"> 
 
      <h2 class="title"> Search</h2> 
 
      <div class="widget-content"> 
 
      <div id="multi-search"> 
 
       <select id="cmbColumn" name="cmbColumn"> 
 
       <option value="" />Columns 
 
       <option value="apple+" />apple 
 
       <option value="grapes+" />grapes 
 
       </select> 
 
       <select id="cmbSidebar" name="cmbSidebar"> 
 
       <option value="" />Sidebars 
 
       <option value="mango+" />mango 
 
       <option value="berry+" />berry 
 

 
       </select> 
 

 
       <input onclick=" getValue() " value="Filter" type="button" /> 
 
      </div> 
 
      </div> 
 
      <div class="clear"></div> 
 
      <span class="widget-item-control"> 
 
           <span class="item-control blog-admin"> 
 
            <a class="quickedit" href="https://www.blogger.com/rearrange?blogID=1273768514594589200&action=editWidget&sectionId=main" onclick=" return _WidgetManager._PopupConfig(document.getElementById(&quot;HTML3&quot;)); " target="configHTML3" title="Edit"> 
 
             <img alt="" src="http://img1.blogblog.com/img/icon18_wrench_allbkg.png" height="18" width="18" /> 
 
            </a> 
 
           </span> 
 
      </span> 
 
      <div class="clear"></div> 
 
     </div> 
 
     </div> 
 
     <div class="tabs section" id="main"></div> 
 
    </div> 
 
    </div> 
 
    <div class="tabs-cap-bottom cap-bottom"> 
 
    <div class="cap-left"></div> 
 
    <div class="cap-right"></div> 
 
    </div> 
 
</div> 
 

 

 
<script> 
 
function getValue() { 
 
    var valcmbColumn = document.getElementById("cmbColumn").value; 
 
    var valcmbSidebar = document.getElementById("cmbSidebar").value; 
 

 
    valOutput = "label:"+valcmbColumn+"|label:"+ valcmbSidebar; 
 
    window.open("http://urstrulyvijay.blogspot.in//search/?q=" + valOutput, "_self"); 
 
    } 
 
</script>

我在blog我的問題實施Jquery editable select是我要刪除空格http://urstrulyvijay.blogspot.in/search/?q=label:apple%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20|label:mango

我的意思是實際一個低於之間的空間並看到this圖像明白問題清除

http://urstrulyvijay.blogspot.in/search/?q=label:apple|label:mango 

我已經知道這個空間問題是由於文本和垂直條,如果我沒有錯。 image

+0

你需要共享一些相關的代碼(HTML CSS JQ)如果你想我們的幫助。 –

+0

哦對不起我現在更新 – overflowstack9

+0

@MihaiT更新 – overflowstack9

回答

0

您只需你的期權價值後的空間。此外,不關閉option標籤可能是一個問題。

你應該改變這樣的:

<option value="apple+" />apple 

要這樣:

<option value="apple+">apple</option> 
+0

chaimillard我的博客不支持關閉它後/ /因爲它是xml它是博客......平臺任何其他方式與CSS ... 。? – overflowstack9

+1

@ overflowstack9看到我的回答 – madalinivascu

+0

在我的回答中,我不使用/> AND