我在 div 内的网页中有控件,我的要求是根据 div 高度排列控件,即,当 div 高度发生变化时,控件应根据高度重新排列
这听起来很简单,但非常感谢任何帮助
<div class="messagepop pop" id="firstpop" style="width: 250px; display: block;border:4px solid #aaa">
<a class="search-choice-close" onclick="closeRsltDiv('contact','firstpop')" href="javascript:void(0)" style="float:right;font-weight:900;">X</a>
<div id="div_result_holder" class="chzn-container chzn-container-multi chzn-container- active" style="height:100px;width:248px;overflow-y:scroll;border:2px solid #aaa">
<ul id="merch_drp_div_ul" class="chzn-choices"></ul>
</div>
<br>
<input type="button" class="btn" value="Clear All" onclick="clearSelected('merch_drp')">
</div>
<br/><br/><br/>
<input type="button" id="btnid" class="btn" value="Change Size" onclick="changeSize('firstpop')">
$('#btnid').click(function(){
//alert("hai");
var somediv = document.getElementById("firstpop");
somediv.style.height = "500px";
});