关于checkbox标签里的值

 <form action="url" method="post">
<tr>
<td><checkbox value="值1">值1</td>
<td><input type="text" value="值2">值2</td>
<td><input type="text" value="值3">值3</td>
<td><input type="text" value="值4">值4</td>
</tr>
<input type="submit" name="" value="">
<form>

如果选中checkbox 就将

 <tr>

里的所有值post怎么搞,谢谢大神! 如果checkbox按钮被选中 那么值1-值4都被提交到表单

html写的有问题,不知道题主具体什么意思。
html:

 <form>
            <table>
                <tr>
                    <td><input type="checkbox" id="checkbox" />值</td>
                    <td>值</td>
                    <td>值</td>
                    <td>值</td>
                </tr>
            </table>
        </form>

js:
$("#checkbox").change(function(){
if($(this).prop("checked")){
var data = $("form").find('td').text();
$.ajax({
url: '/path/to/file',
type: 'POST',
data: data,
success: function(){
//...
}
})
}
})


html写的有问题,不知道题主具体什么意思。
html:

 <form>
            <table>
                <tr>
                    <td><input type="checkbox" id="checkbox" />值</td>
                    <td>值</td>
                    <td>值</td>
                    <td>值</td>
                </tr>
            </table>
        </form>

js:

 $("#checkbox").change(function(){
            if($(this).prop("checked")){
                var data = $("form").find('td').text();
                $.ajax({
                    url: '/path/to/file',
                    type: 'POST',
                    data: data,
                    success: function(){
                        //...
                    }
                })
            }
        })

这时我的测试代码。

value值,传过去的是value值

值1值2值3值4