私は12列のテーブルを持っています。各列は、「はい」と「いいえ」の値として1つのドロップダウンを持ちます。ドロップダウンのデフォルト値は「はい」です。送信ボタンをクリックしながら、選択したデータを送信したい。anglejsのコントローラから選択したドロップダウンデータを送信するには
<!DOCTYPE html>
<html>
<head>
<script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular.min.js"></script>
</head>
<style>
table {
border-collapse: collapse;
margin:0 auto;
}
table, td, th {
border: 1px solid black;
}
</style>
<body>
<table>
<tr>
<th>Month 1</th>
<th>Month 2</th>
<th>Month 3</th>
<th>Month 4</th>
<th>Month 5</th>
<th>Month 6</th>
<th>Month 7</th>
<th>Month 8</th>
<th>Month 9</th>
<th>Month 10</th>
<th>Month 11</th>
<th>Month 12</th>
</tr>
<tr>
<td><select>
\t <option>Yes</option>
\t <option>No</option>
</select></td>
<td><select>
\t <option>Yes</option>
\t <option>No</option>
</select></td>
<td><select>
\t <option>Yes</option>
\t <option>No</option>
</select></td>
<td><select>
\t <option>Yes</option>
\t <option>No</option>
</select></td>
<td><select>
\t <option>Yes</option>
\t <option>No</option>
</select></td>
<td><select>
\t <option>Yes</option>
\t <option>No</option>
</select></td>
<td><select>
\t <option>Yes</option>
\t <option>No</option>
</select></td>
<td><select>
\t <option>Yes</option>
\t <option>No</option>
</select></td>
<td><select>
\t <option>Yes</option>
\t <option>No</option>
</select></td>
<td><select>
\t <option>Yes</option>
\t <option>No</option>
</select></td>
<td><select>
\t <option>Yes</option>
\t <option>No</option>
</select></td>
<td><select>
\t <option>Yes</option>
\t <option>No</option>
</select></td>
</tr>
</table>
<input type="submit" name="submit" ng-click="getValue()">
</body>
</html>
これが私のテーブルです。 getやpostメソッドを使って選択したデータを送るanglejsコードを書く方法。
ありがとうございます。これは私が期待したものです –