这是我的html代码
<div id="list_refer_1">
<form id="refer_1_0">
<input type="hidden" name="channel" value="1">
<input type="hidden" name="url" id="input_1_0" value="http://localhost:8000/">
<input type="button" onclick="pullrefer(1, 0);" value=" - ">
http://localhost:8000/
</form>
<form id="refer_1_xxxxx"> ///xxxxx is timestamp
<input type="hidden" name="channel" value="1">
<input type="hidden" name="url" id="input_1_1" value="http://127.0.0.1:8000/">
<input type="button" onclick="pullrefer(1, 1);" value=" - ">
http://127.0.0.1:8000/
</form>
<form id="refer_1_2">
<input type="hidden" name="channel" value="1">
<input type="hidden" name="url" id="input_1_2" value="http://localhost*">
<input type="button" onclick="pullrefer(1, 2);" value=" - ">
http://localhost*
</form>
...
我可以通过
$('#list_refer_1 #refer_1_0 input[name=url]').val();
但我想得到
$('input[name=url]').val() from $('#list_refer_1 **form**')**[1]**;
如何得到它?谢谢你。