<ul id="parent">
                    <li>1</li>
                    <li>2</li>
                    <li>3</li>
                    <li>4</li>
                </ul>
 <input onclick="javascript: selectvalue();" type="button" value="搜索">
var selectValue='';      
   $(function () {         
    $("ul li").click(function () {
                selectValue = $(this).text(); //获取点击li的值      
       });          
   $("#btnSearch").click(function () {            
                     if (selectValue != '') {               
                      location.href = "你要跳转的地址" + selectValue;          
                       }         
    });         })

 

相关文章:

  • 2022-12-23
  • 2021-09-22
  • 2022-12-23
  • 2021-10-29
  • 2022-12-23
  • 2022-12-23
  • 2021-11-29
  • 2021-10-19
猜你喜欢
  • 2021-11-29
  • 2022-12-23
  • 2022-02-26
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案