anchor

What does “href” stand for in HTML?

前提是你 提交于 2019-11-27 11:38:01
问题 I understand what the "href" attribute in the anchor tag ( <a /> ) is for, but what does the "h" stand for? 回答1: HREF stands for "Hypertext Reference". Source: https://www.w3.org/Provider/ServerWriter.html 回答2: Hypertext REFerence 回答3: the h stands for hypertext- in mathematics, hyperspace means greater than 3 dimensions. Got to love the superlative! 回答4: The official name is supposedly (H)ypertext (REF)erence, but I always liked to think of it as Hyperlink Reference. 来源: https:/

Difference between _self, _top, and _parent in the anchor tag target attribute

最后都变了- 提交于 2019-11-27 11:37:24
问题 I know _blank opens a new tab when used with the anchor tag and also, there are self-defined targets I use when using framesets but I will like to know the difference between _parent , _self and _top . 回答1: While these answers are good, IMHO I don't think they fully address the question. The target attribute in an anchor tag tells the browser the target of the destination of the anchor. They were initially created in order to manipulate and direct anchors to the frame system of document. This

How to link html pages in same or different folders?

隐身守侯 提交于 2019-11-27 10:57:01
How can I link to html pages if they are in same or different folders without writing full path? AgileJon Within the same folder, just use the file name: <a href="thefile.html">my link</a> Within the parent folder's directory: <a href="../thefile.html">my link</a> Within a sub-directory: <a href="subdir/thefile.html">my link</a> Also, this will go up a directory and then back down to another subfolder. <a href = "../subfolder/page.html">link</a> To go up multiple directories you can do this. <a href = "../../page.html">link</a> To go the root, I use this <a href = "~/page.html">link</a> In

How can I create an empty HTML anchor so the page doesn't “jump up” when I click it?

主宰稳场 提交于 2019-11-27 09:56:48
问题 I'm working on some JQuery to hide/show some content when I click a link. I can create something like: <a href="#" onclick="jquery_stuff" /> But if I click that link while I'm scrolled down on a page, it will jump back up to the top of the page. If I do something like: <a href="" onclick="jquery_stuff" /> The page will reload, which rids the page of all the changes that javascript has made. Something like this: <a onclick="jquery_stuff" /> Will give me the desired effect, but it no longer

Is it possible to hide the title from a link with CSS?

人走茶凉 提交于 2019-11-27 09:11:53
I have an anchor element with a title attribute. I want to hide the popup that appears when hovering over it in the browser window. In my case, it is not possible to do something like this, $("a").attr("title", ""); Because of jQuery Mobile the title will reappear after certain events occur (basically everytime the anchor element gets redrawn). So I hope to hide the title via CSS. Something like: a[title] { display : none; } doesn't work, since it hides the entire anchor element. I want to hide the title only. Is this even possible? The popup shouldn't display. Using the following CSS property

javascript regex to extract anchor text and URL from anchor tags

徘徊边缘 提交于 2019-11-27 07:01:17
I have a paragraph of text in a javascript variable called 'input_content' and that text contains multiple anchor tags/links. I would like to match all of the anchor tags and extract anchor text and URL, and put it into an array like (or similar to) this: Array ( [0] => Array ( [0] => <a href="http://yahoo.com">Yahoo</a> [1] => http://yahoo.com [2] => Yahoo ) [1] => Array ( [0] => <a href="http://google.com">Google</a> [1] => http://google.com [2] => Google ) ) I've taken a crack at it ( http://pastie.org/339755 ), but I am stumped beyond this point. Thanks for the help! var matches = [];

CodeIgniter - Correct way to link to another page in a view

天大地大妈咪最大 提交于 2019-11-27 06:59:09
I was wondering if someone could tell me the correct way to link to another page from within a view. Is there a function for this or is it just the usual about Cheers, I assume you are meaning "internally" within your application. you can create your own <a> tag and insert a url in the href like this <a href="<?php echo site_url('controller/function/uri') ?>">Link</a> OR you can use the URL helper this way to generate an <a> tag anchor(uri segments, text, attributes) So... to use it... <?php echo anchor('controller/function/uri', 'Link', 'class="link-class"') ?> and that will generate <a href=

append /remove anchor name from current url without refresh

我是研究僧i 提交于 2019-11-27 06:53:59
I want that on click event to append/remove the anchor name "#on" to be added to the current url without reloading the page, or use the href='#on' from links because it makes my page jump Eg: http://www.example.com/page.html#on so I can get the detect the users that come from that url and call the On() function function On() { //append to current url the anchor "#on" } function Off() { //remove from the current url the anchor "#on" } $('.on').live('click', function() { On(); return false; }); $('.off').live('click', function() { Off(); return false; }); You don't really need jQuery for that,

Difference between text and textContent properties

假装没事ソ 提交于 2019-11-27 06:36:05
问题 According to the HTML5 specification and the DOM specification an HTMLAnchorElement has a text and a textContent property. What is the purpose of the text property? As far as I can tell text is just a read-only getter for textContent 回答1: The textContent property is "inhertied" from the Node interface of the DOM Core specification. The text property is "inherited" from the HTML5 HTMLAnchorElement interface and is specified as "must return the same value as the textContent IDL attribute". The

Smooth scroll anchor links WITHOUT jQuery

℡╲_俬逩灬. 提交于 2019-11-27 06:29:37
Is it possible to use smooth scroll to anchor links but without jQuery ? I am creating a new site and I don't want to use jQuery . Ian Using the function from here: JavaScript animation and modifying it to modify a property (not only a style's property), you can try something like this: function animate(elem, style, unit, from, to, time, prop) { if (!elem) { return; } var start = new Date().getTime(), timer = setInterval(function () { var step = Math.min(1, (new Date().getTime() - start) / time); if (prop) { elem[style] = (from + step * (to - from))+unit; } else { elem.style[style] = (from +