#parentBox { width: 750px; height: 150px; } #leftBox { width:350px; height:120px; margin:5px; padding:3px; } #rightBox { width:250px; height:120px; margin:5px; position: relative; top: -120px; left: 360px; border:1px dotted #317082; padding:3px; font-size:0.8em; background-color:#99FF99; overflow-x: scroll; overflow-y: scroll; }
<div id="parentBox"> <form id="leftBox" name="myform"> 姓名:<input type="text" id="name"></input> <input type="button" id="yuibut" value="確定"></input> </form> <div id="rightBox" id="result"> </div> </div>
var callback = { success: function(o) { document.getElementById('rightBox').innerHTML = o.responseText; }, failure: function(o) { document.getElementById('rightBox').innerHTML = "錯誤:無法取得回應"; } };