html label don't work in ajax
I'm loading html page via Ajax. Here's the data:
<input type="checkbox" name="dis_net" id="dis_开发者_C百科net" value="1" />
<label for="dis_net">Test</label>
But the Label does not work. There is a way to solution. When I click in the Label checkbox to not put a tick
If we write the other way, it works
<label for="dis_net">Test</label>
<input type="checkbox" name="dis_net" id="dis_net" value="1" />
Other way of labeling:
<label><input type="checkbox" name="myinput" />Test</label>
This way it alway works. I tested your HTML it worked me well, even by loading it with AJAX. What browser do you test it? Strange errors like this can be browser specific.
精彩评论