将div的水平滚动条的位置设置为左侧 [英] Set position of the horizontal scroll bar of div to left
本文介绍了将div的水平滚动条的位置设置为左侧的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在这里附上我的代码请帮我在加载页面时将div的水平滚动条设置为middile。
< script type = text / javascript >
{
window .onload = function (){val(); };
function val(){
$( divrpt)。scrollLeft( 100 );
}
}
< / script >
< div id = divrpt style = overflow:auto; width:750px; height:350px; removed:absolute; >
< p > < CR:CrystalReportViewer ID = CrystalReportViewer1 runat = server
< span class =code-attribute> AutoDataBind = True 高度 = 50px ReportSourceID = CrystalReportSource1
宽度 = < span class =code-keyword> 150px DisplayGroupTree = 错误 / >
< p >
< CR:CrystalReportSource ID = CrystalReportSource1 runat = server >
< 报告 FileName = Crystal Reports \CRContac tDetails.rpt >
< / Report >
< / CR:CrystalReportSource >
< / p >
< / div >
解决方案
( divrpt)。scrollLeft( 100 跨度>);
}
}
< / script >
< div id = divrpt style = overflow:auto; width:750px; height:350px; removed:absolute; >
< p > < CR:CrystalReportViewer ID = CrystalReportViewer1 runat = server
< span class =code-attribute> AutoDataBind = True 高度 = 50px ReportSourceID = CrystalReportSource1
宽度 = < span class =code-keyword> 150px DisplayGroupTree = 错误 / >
< p >
< CR:CrystalReportSource ID = CrystalReportSource1 runat = server >
< 报告 FileName = Crystal Reports \CRContac tDetails.rpt >
< / Report >
< / CR:CrystalReportSource >
< / p >
< / div >
< blockquote>使用CSS属性:
# divrpt
{
方向 : rtl;
}
I here by attached my code please help me to set the horizontal scrollbar of the div to middile while loading the page.
<script type="text/javascript">
{
window.onload = function() { val(); };
function val() {
$("divrpt").scrollLeft(100);
}
}
</script>
<div id="divrpt" style="overflow:auto;width:750px;height:350px; removed:absolute;" >
<p><CR:CrystalReportViewer ID="CrystalReportViewer1" runat="server"
AutoDataBind="True" Height="50px" ReportSourceID="CrystalReportSource1"
Width="150px" DisplayGroupTree="False" />
<p>
<CR:CrystalReportSource ID="CrystalReportSource1" runat="server">
<Report FileName="Crystal Reports\CRContactDetails.rpt">
</Report>
</CR:CrystalReportSource>
</p>
</div>
解决方案
("divrpt").scrollLeft(100); } } </script> <div id="divrpt" style="overflow:auto;width:750px;height:350px; removed:absolute;" > <p><CR:CrystalReportViewer ID="CrystalReportViewer1" runat="server" AutoDataBind="True" Height="50px" ReportSourceID="CrystalReportSource1" Width="150px" DisplayGroupTree="False" /> <p> <CR:CrystalReportSource ID="CrystalReportSource1" runat="server"> <Report FileName="Crystal Reports\CRContactDetails.rpt"> </Report> </CR:CrystalReportSource> </p> </div>
Use CSS property :
#divrpt { direction:rtl; }
这篇关于将div的水平滚动条的位置设置为左侧的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文