gpt4 book ai didi

javascript - 根据 Language Session Bootstrap 更改 Div 位置

转载 作者:行者123 更新时间:2023-11-28 04:43:28 25 4
gpt4 key购买 nike

/////////分区详细信息

<div class="col-md-6 col-sm-6 col-xs-12 profile_left">
<ul class="list-unstyled user_data">
<li>
<i class="fa fa-map-marker user-profile-icon voilet"></i>
<asp:Label ID="lblArea" runat="server" Text="Area"></asp:Label>
<asp:Label ID="lblBlock" runat="server" Text="Area"></asp:Label>
</li>
<li>
<i class="fa fa-location-arrow user-profile-icon voilet"></i>Street
<asp:Label ID="lblStreet" runat="server" Text="-"></asp:Label>, Building
<asp:Label ID="lblBuilding" runat="server" Text="--"></asp:Label>, Floor
<asp:Label ID="lblFloor" runat="server" Text="Floor"></asp:Label>, Flat
<asp:Label ID="lblflat" runat="server" Text="Flat"></asp:Label>
</li>
<li>
<i class="fa fa-mobile user-profile-icon voilet"></i>
<asp:Label ID="lblMobile1" runat="server" Text="Mobile1"></asp:Label>-
<asp:Label ID="lblMobile2" runat="server" Text="Mobile2"></asp:Label>
</li>
<li>
<i class="fa fa-envelope-o user-profile-icon voilet"></i>
<asp:Label ID="lblEmail" runat="server" Text="EmailAddress"></asp:Label>
</li>
<li>
<i class="fa fa-briefcase user-profile-icon voilet"></i>
<asp:Label ID="lblcompany" runat="server" Text="Company"></asp:Label>
</li>
</ul>
</div>

<div class="col-md-6 col-sm-6 col-xs-12">
<div class="animated flipInY tile-stats" style="background: #d9534f; color: #ffffff;">
<div class="count">
<asp:Label ID="lblbalance" runat="server" Text=""></asp:Label>
</div>
<p>BALANCE</p>
</div>

<asp:LinkButton runat="server" ID="btncallme" class="btn btn-success btn-lg" Style="width: 100%;"
OnClientClick="return confirm('Are you sure you want to Request Call Back?');"
OnClick="btncallme_Click">
<i class="fa fa-mobile m-right-xs"></i> Call Me Back
</asp:LinkButton>
<asp:LinkButton runat="server" ID="btnpickup" OnClientClick="return confirm('Are you sure you want to Request Pickup?');"
class="btn btn-warning btn-lg" Style="width: 100%;" OnClick="btnpickup_Click">
<i class="fa fa-rocket m-right-xs"></i> Pickup My Stuff
</asp:LinkButton>
<asp:LinkButton runat="server" ID="btnaddbalance" class="btn btn-primary btn-lg" Style="width: 100%;">
<i class="fa fa-plus m-right-xs"></i> Add Balance
</asp:LinkButton>
<asp:LinkButton runat="server" ID="btneditprofile" class="btn btn-danger btn-lg" Style="width: 100%;">
<i class="fa fa-edit m-right-xs"></i>Change Password
</asp:LinkButton>

</div>

我有两个 div,我想根据语言英语/阿拉伯语更改其位置。如果 session 是阿拉伯语 Div Actions 应该在 Div Detail 之前,反之亦然。

网站 build

最佳答案

这里有一些服务器端代码可能对此有所帮助,尽管可能有更简洁的方法

            protected void Page_Load(object sender, EventArgs e)
{
int here = -1;
for (int i = 0; i<Request.Headers.Keys.Count; i++)
{
if (Request.Headers.Keys[i] == "Accept-Language")
{
here = i;
}
}
if(here > -1) {
String lan = Request.Headers[here];
if(lan == "en-US")
{
// do this
}
else
{
// do that
}
}
else {
// do a client side solution
}

关于javascript - 根据 Language Session Bootstrap 更改 Div 位置,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41085545/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com