我有三个范围第一个范围是Main,另一个是它的孩子..当我改变主范围时我想自动改变另一个范围
Sub RemovePartsOfTable()
Dim row As Range
For Each row In ListObjects("Table6").DataBodyRange.Rows
If row.Columns(6).Value = "" Then 'to exit when it hits the end of the used cells
Exit For
ElseIf row.Columns(1).Value <> "P" And row.Columns(1).Value <> "B" _
And row.Columns(2).Value <> "B" _
And row.Columns(2).Value <> "P" Then
row.Delete
End If
Next
End Sub
答案 0 :(得分:2)
这是一个基本的例子
Main:<input id="main" type="range" name="range" step="1" value="0" min="0" max="200" 0 style="width:100%;" /> <br> <BR>
Child range:<br>
<input id="child1" type="range" name="range" step="1" value="0" min="0" max="200" 0/>
<input id="child2" type="range" name="range" step="1" value="0" min="0" max="200" />
<h3>when i change Main range i want change child range with Main
</h3>
oninput
如果您想要实时反馈,因为范围会在不等待鼠标释放的情况下发生变化,您可以听var rangeMain = document.getElementById('main'),
rangeChild1 = document.getElementById('child1'),
rangeChild2 = document.getElementById('child2');
rangeMain.onchange = function(){
rangeChild1.value = this.value;
rangeChild2.value = this.value;
}
rangeMain.oninput = function(){
rangeChild1.value = this.value;
rangeChild2.value = this.value;
}
Main:<input id="main" type="range" name="range" step="1" value="0" min="0" max="200" 0 style="width:100%;" /> <br> <BR>
Child range:<br>
<input id="child1" type="range" name="range" step="1" value="0" min="0" max="200" 0/>
<input id="child2" type="range" name="range" step="1" value="0" min="0" max="200" />
<h3>when i change Main range i want change child range with Main
</h3>
{{1}}