コメント |
@DIV
<!DOCTYPE html>
<html lang="ja">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>jQuery テンプレート</title>
<script src="//ajax.googleapis.com/ajax/libs/jquery/2.1.0/jquery.min.js"></script>
<link rel="stylesheet" href="//ajax.googleapis.com/ajax/libs/jqueryui/1.10.1/themes/base/jquery-ui.css">
<script src="//ajax.googleapis.com/ajax/libs/jqueryui/1.10.1/jquery-ui.min.js"></script>
<script type="text/javascript">
// ***********************************************
// 画面初期化後のイベント( jQuery )
// ***********************************************
$(function() {
var optionValueText = [
[
"A",
"B",
"C",
"D",
"E",
"F",
"G",
"H",
"I",
"J"
],
[
"あああ",
"いいい",
"ううう",
"えええ",
"おおお",
"かかか",
"ききき",
"くくく",
"けけけ",
"こここ"
]
];
$("#selectContent")
.prop("length", 10)
.change(function(){
console.log("選択が変更されました");
})
.children()
.each(function(idx){
$(this).val(optionValueText[0][idx]);
$(this).text(optionValueText[1][idx]);
});
});
</script>
</head>
<body>
<select id="selectContent">
</select>
</body>
</html>
@END |