这是我的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]**;
如何获得它?
谢谢。