<p>I am using Spring Forms for my web application. For nested properties, the form tag generates the input elements having id / name in form of .</p>

<p>For example, Person is the command class and Address is contained into its address field then the city element would be,</p>

<pre><code>&lt;input type="text" id="address**.**city" name="address**.**city" /&gt;
</code></pre>

<p>now, the problem is whenever I try to get its value using jQuery,</p>

<pre><code>$("#address.city").val();
</code></pre>

<p>jQuery fails to select any appropriate element !</p>

<p>Please let me know any solution.</p>

<p>Thanks in advance.</p>

Try this:
```
```
$("#address\\.city").val();
```
```
From
the documentation
:
Note: if you wish to use any of the meta-characters described above as a literal part of a name, you must escape the character with two backslashes (
```
\
```
). For example:
```
```
#foo\\:bar
#foo\\[bar\\]
#foo\\.bar
```
```