jQuery: 选择器包含特殊字符,选择器包含括号,jQuery selector for inputs with square brackets in the name attribute

 

看以下代码,一目了然:

Per the jQuery documentation, try this:

$('input[inputName\\[\\]=someValue]')

[EDIT] However, I’m not sure that’s the right syntax for your selector. You probably want:

$('input[name="inputName[]"][value="someValue"]')

 

本文:jQuery: 选择器包含特殊字符,选择器包含括号,jQuery selector for inputs with square brackets in the name attribute

Loading

Add a Comment

Your email address will not be published. Required fields are marked *

Time limit is exhausted. Please reload CAPTCHA.