Tag: 导航

如何让浏览器导航到JavaScript中的URL?

什么是最好的(正确的,现代的,跨浏览器,安全)的方式来让浏览器导航到您select使用Javascript的URL?

NavigationView和自定义布局

我正在使用这样的devise支持库NavigationView : <android.support.v4.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" android:id="@+id/drawer_layout" android:layout_height="match_parent" android:layout_width="match_parent" android:fitsSystemWindows="true"> <!– put your main layout here –> <include layout="@layout/drawer_main_layout"/> <android.support.design.widget.NavigationView android:id="@+id/nav_view" android:layout_height="match_parent" android:layout_width="wrap_content" android:layout_gravity="start" android:fitsSystemWindows="true" app:headerLayout="@layout/nav_header" app:menu="@menu/drawer_view"/> </android.support.v4.widget.DrawerLayout> 我已经设置了这个菜单: <menu xmlns:android="http://schemas.android.com/apk/res/android"> <group android:checkableBehavior="single"> <item android:id="@+id/nav_home" android:icon="@drawable/ic_dashboard" android:title="Home" /> <item android:id="@+id/nav_messages" android:icon="@drawable/ic_event" android:title="Messages" /> <item android:id="@+id/nav_friends" android:icon="@drawable/ic_headset" android:title="Friends" /> <item android:id="@+id/nav_discussion" android:icon="@drawable/ic_forum" android:title="Discussion" /> </group> <item android:title="Sub […]

Google Web Toolkit(GWT)中的多页面教程

我刚开始学习Google Web Toolkit (GWT)。 我如何在我的GWT应用程序中制作不同的HTML页面? 例如,我想创build一个书店的应用程序。 在这个应用程序中,我将有三个页面: 主页,我会欢迎用户,并提供用户的书籍 页面按类别浏览图书并查看详细信息(使用GWT小部件) 在线查看书籍。 当然,也可能有其他页面,如用户的详细信息,添加新的书籍等等。那么,在GWT中制作不同页面的最佳方式是什么?我怎样才能使页面之间的导航? 有没有例子或教程? 或者,我甚至需要创build不同的页面,当我可以在一个页面上创build一个完整的应用程序?

JQGrid以编程方式select网格行

我有一个JQGrid loadonce:true(所以这是所有客户端)和分页启用(与20页)。 我想指定一个行(以编程方式,没有用户input),并让我的网格导航到相应的页面来select指定的行。 这与目前的JQGrid可能吗? 我已经看过search和filter,但只是重新加载网格的新行 – 我需要我的网格导航到正确的页面 – 保持其数据和结构。 我正在优化我的网格结构,所以任何需要的变化(比如客户端到服务器端)都是可能的。

以编程方式滚动到锚标签

考虑下面的代码: <a href="#label2">GoTo Label2</a> … [content here] … <a name="label0"></a>More content <a name="label1"></a>More content <a name="label2"></a>More content <a name="label3"></a>More content <a name="label4"></a>More content 有没有一种方法来模仿点击“GoTo Label2”链接滚动到页面上通过代码适当的地区? 编辑 :一个可以接受的替代方法是滚动到一个唯一的ID,它已经存在于我的网页上的元素。 如果这是一个可行的解决scheme,我将添加锚标签。

如何为许多页面做页面导航? 对数页面导航

为许多页面显示页面导航的最佳方式是什么? (最初,这是作为一个方法提示,我的答案包括在问题中,现在我把答案分解到下面的“答案”部分)。 更具体地说: 假设您向用户显示一组logging,将其分解为固定大小的页面(例如,Googlesearch的结果)。 如果只有几页,则可以在结果的末尾显示一个页面导航区域,如下所示: [<<] [<] 1 2 3 4 5 6 7 8 9 10 11 12 13 [>] [>>] 但是,如果结果超过20或30页,这很快就会变得不正常。 有时你会看到这样的事情: [<<] [<] … 665 666 667 668 669 670 671 672 673 … [>] [>>] 或这个: [<<] [<] 1 2 3 … 667 668 669 670 671 … 845 846 847 […]

我应该使用JavaScript中的window.navigate或document.location?

什么是使用JavaScript更改当前网页位置的首选方法? 我已经看到使用window.navigate和document.location。 行为有任何不同吗? 浏览器实现有差异吗?

如何创build一个粘滞的导航栏,滚动后变成固定的顶部

我试图在第一次加载网站时在可见页面的底部创build一个导航栏,然后当用户向下滚动时,导航栏向上滚动,最终变成固定在顶部。 我正在使用Bootstrap,就像这个网站,但我无法弄清楚这个网站是如何做到的。 任何帮助? 这里是我想要模拟导航栏的网站: http : //www.blastprocessor.co.uk/ 这是我的导航HTML和CSS代码: HTML: <div class="navbar navbar-fixed-top" id="navbar"> <div class="navbar-inner"> <div class="container"> <a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse"> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> </a> <div class="nav-collapse"> <ul class="nav nav-pills"> <li class="active"><a href="#home">Home</a></li> <li><a href="#service-link">Services</a></li> <li><a href="#contact-link">Contact</a></li> </ul><!– /.nav –> </div><!–/.nav-collapse –> </div><!– /.container –> </div><!– /.navbar-inner –> </div><!– /.navbar –> […]

在Django导航

我刚刚在django做了我的第一个小webapp,我喜欢它。 我即将开始将旧生产PHP站点转换为Django,作为其模板的一部分,有一个导航栏。 在PHP中,我检查每个导航选项的URL与模板代码中的当前URL,并应用一个CSS类,如果他们排队。 这是可怕的凌乱。 有没有更好的Django或在模板中处理代码的好方法? 要开始,我将如何去获取当前的url?

分隔符用于导航

我需要在导航元素之间添加分隔符。 分隔符是图像。 我的HTML结构就像: ol> li> a> img 。 在这里我有两个可能的解决scheme: 要添加更多的分离标签(boo!), 在每个元素的图像中包含分隔符(这是更好的,但它可能使用户可以点击,例如,“家”,但得到“服务”,因为他们是一个在另一个之后,用户可能会意外地点击分隔符属于“服务”); 该怎么办?