href

HTML: remove a:hover for images?

元气小坏坏 提交于 2019-12-30 06:03:33
问题 For text links, I have: CSS: a:link {color: #3366a9; text-decoration: none} a:hover {border-bottom: 1px solid; color: black} But this also adds a black underline on linkable IMGs that I do not want. How do I remove the border-bottom on linkable IMGs when hovered using CSS? I've tried the following: a:hover img {border-bottom: 0px} But that doesn't work Live example (try to hover over the logo in top-left) 回答1: If you float your images vs. inline this will work and will require no

AngularJS + Base Href Case Sensitive?

喜欢而已 提交于 2019-12-28 17:42:18
问题 I'm struggling to understand why my base href seems to be case sensitive. I have a page with a base href and utilizes angularjs routing. html: <html ng-app="app"> <head> <base href="/Foo/"/> </head> <body> <div>Foo</div> <div ng-view></div> </body> </html> js: var module = angular.module('app', []); module.config(function ($routeProvider, $locationProvider) { $routeProvider .when('/Home/Page1', { templateUrl = 'partials/page1' }) .otherwise({ redirectTo: '' }); $locationProvider.html5Mode

Correct syntax for hyperlink URL with PHP $_GET

大城市里の小女人 提交于 2019-12-28 06:52:25
问题 I am wondering how I would put information from my website in the URL on the first page of my site, and then on the next page, use $_GET to get the variables from the URL. I was just wanting to put it in a link like <a href="mywebsite.com/page?name=$name"></a> So would it work if I did it like that, and if it would, how would I get it from the URL? 回答1: do <a href="http://mywebsite.com/page?name=<?php echo $name; ?>"></a> And in your page, you could get the name as: $name = $_GET['name']; 回答2

get all the href attributes of a web site [duplicate]

大兔子大兔子 提交于 2019-12-28 02:51:25
问题 This question already has answers here : How to get all the URLs in a web site using JavaScript? (4 answers) Closed 3 years ago . can anybody tell me a way to get all the href attributes(links) in a web site using javascript?if you could give me a code example, i will be most thankful. 回答1: You can use document.links to get the anchors, then just loop through grabbing the href , like this: var arr = [], l = document.links; for(var i=0; i<l.length; i++) { arr.push(l[i].href); } //arr is now an

href="javascript"

删除回忆录丶 提交于 2019-12-26 02:19:15
"#"其实是包含了位置信息,例如默认的锚点是#top 也就是网页的上端 点完之后回到页面上端 href="#top" 这里不采用 javascript:是伪协议,表示url的内容通过javascript执行。void(0)表示不作任何操作,这样会防止链接跳转到其他页面。 javascript:是表示在触发默认动作时,执行一段JavaScript代码,而 javascript:; 表示什么都不执行,这样点击时就没有任何反应。 来源: CSDN 作者: zp2605811855 链接: https://blog.csdn.net/zp2605811855/article/details/103702758

Can't output relevant mysql information to clicked link using SELECT *FROM table WHERE variable LIKE '$variable'

蹲街弑〆低调 提交于 2019-12-25 18:45:20
问题 I have a mysql database named "drinks", in that database I have one table named "persons" and in "persons" I have two people, Bryan(fname) Fajardo(lname) 21(age) and Andross H Age:20. In my index.php I have links set up from all of the people in table persons. I am trying to get my links to work so that when I click on either name, the information relevant from that person is outputted into my other page (where the link goes to) which is: insert.php. I have been trying for hours to run some

HTML5: should hreflang always point to a direct translation?

末鹿安然 提交于 2019-12-25 16:38:04
问题 This is a good practice to place this kind of links in head for multilanguage sites: <head> <link rel="alternate" hreflang="en" href="/en"> </head> But, according to an answer to the question Semantic markup for language switcher, language switcher should look something like: <nav> <h1>Translations of this page</h1> <!-- could be omitted → usability question --> <ul> <li>English</li> <!-- could be omitted → usability question --> <li><a rel="alternate" href="/pl" hreflang="pl" lang="pl"

Is it possible to make an href jump on the same page with the destination element not having an id?

拈花ヽ惹草 提交于 2019-12-25 09:28:15
问题 Is it possible to make an <a href> link to the same page when your destination doesn't have an ID? <a href = "#">Jump to Topic 1</a> ... <!--destination is below--> <h1 class="tab-title" data-editor-style="title" style="color:#444444">Topic 1</h1> 回答1: Sadly, the answer is no. You need an ID or at least a name, like CBroe mentioned in a comment of your question. However, I found this here: Today, all browsers recognize top as being the top of the page. If you want the visitor to go to the

Jquery href attribute not getting disabled

僤鯓⒐⒋嵵緔 提交于 2019-12-25 08:01:19
问题 I can't seem to implement the correct syntax and/or logic to remove an anchor tag upon a condition being met using Jquery. I then want to enable it again upon another condition being met. My current logic is flawed and doesn't work. I need to know if there is a relatively simple workaround; otherwise, I will just use a button, so I can use the disabled state logic I currently have in place. Please provide fiddle if you have solution. Here is the fiddle - https://jsfiddle.net/carbot3000

a元素href URL链接自动刷新或新窗口打开

ぐ巨炮叔叔 提交于 2019-12-25 07:49:28
一、需求描述 希望实现这样一个功能:点击一个链接,如果这个链接浏览器已经打开过,则刷新已经打开的链接窗口;如果这个链接没有打开过,则使用新窗口打开这个链接页面。 这是一个非常好的体验增强功能,可以有效避免浏览器选项卡中打开重复多余的页面。 如何实现呢? 其实很简单,并不需要JS的参与,HTML本身特性就可以实现这样的需求。 二、你可能不知道的target属性特性 无论是 <a> 链接元素还是 <form> 表单元素都有一个名叫 target 的属性,支持的值包括下面这些: _self :默认值。当前浏览器上下文。 _blank :通常是一个新的标签页,但是用户可以配置浏览器,是否在新窗口打开。 _parent :当前浏览器上下文的的父级上下文,如果没有父级,则行为类似 _self 。 _top :最顶级的浏览器上下文。如果没有祖先上下文环境,则行为类似 _self . 几乎所有的文档都是上面这样的描述。 但是实际上, target 还有一个隐藏特性,那就是可以指定为具体的URL地址或者任意自定义的名称。 例如: <a href="blank.html" target="blank.html">空白页</a> 此时,如果浏览器已经有标签页的地址是blank.html,则点击上面的链接并不会打开新窗口,是直接刷新已经打开的blank.html;如果浏览器中没有地址是blank