NSMutableIndexSet *indexSet = [NSMutableIndexSet indexSet]
for ( NSIndexPath *indexPath in indexPathsForVisibleRows ) {
[indexSet addIndex:indexPath.section]
}
NSLog(@"indexSet %@",indexSet)
// indexSet <NSMutableIndexSet: 0x11a5c190>[number of indexes: 5 (in 1 ranges
<SCRIPT language="javascript"><!--
function set(){
var r
if(document.getElementById("r2").checked){
r=2
}else if(document.getElementById("r3").checked){
r=3
}else{
r=1
}
document.f1.result.value="您的输入框填入"+document.f1.t1.value+",单选框选择"+r+",下拉菜单选择"+document.f1.s1.value
}
//-->
</SCRIPT>
<form name="f1">
<input type="text" name="t1"><br>
<input type="radio" name="r" value="1" id="r1" onclick="set()" checked><input type="radio" name="r" value="2" id="r2" onclick="set()"><input type="radio" name="r" value="3" id="r3" onclick="set()"><br>
<select name="s1" onchange="set()">
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
</select><br>
<input type="text" name="result" size="50">
</form>
<script language="javascript">function showtxt(str)
{
document.getElementById("showvalue").value=str
}
</script>
<form>
<input type="text" id="txt" name="txt" onKeyDown="if(this.value!='')showtxt('你输入了'+this.value)" onKeyUp="if(this.value!='')showtxt('你输入了'+this.value)">
<select id="sel" name="sel" onChange="showtxt('你选择了'+this.options[this.selectedIndex].value)">
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
</select>
<input type="radio" id="rad" name="rad" value="yes" onClick="if(this.checked)showtxt('你选择了'+this.value)">yes
<input type="checkbox" id="che" name="che" value="no" onClick="if(this.checked){showtxt('你选择了'+this.value)}else{showtxt('')}">no
<br>
显示<input type="text" id="showvalue" name="showvalue">
</form>