jquery escape square brackets to select element

前端 未结 6 1354
余生分开走
余生分开走 2021-01-03 04:55

Consider a input element


Here the input field is dynamically generat

6条回答
  •  说谎
    说谎 (楼主)
    2021-01-03 05:49

    this shoudl work for you, you almost had it:

        $(document).ready(function() {
           var id = "#meta\\[152\\]\\[value\\]";
            alert($(id).val()); 
        });
    

提交回复
热议问题