473,396 Members | 1,982 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

How to get a link from a webpage?

hi.
i'd like to know how can i get a link from a page.

for instance, how could i get the link for the first topic on http://www.thescripts.com/ homepage by javascript?
is it possible?

thx
Dec 29 '07 #1
3 1538
acoder
16,027 Expert Mod 8TB
Welcome to TheScripts.

Yes, this is possible:
Expand|Select|Wrap|Line Numbers
  1. var links = document.getElementsByTagName("a");
  2. var firstLink = links[0];
or simply document.getElementsByTagName("a")[0].
Dec 30 '07 #2
thx for the welcome
;)

about the problem, the link isn't in my code...
from my webpage www.mywebpage.com i want the link from thescrips www.thescripts.com

the same function is useful for this?

thx
[]'s
Dec 30 '07 #3
Logician
210 100+
the link isn't in my code...
from my webpage www.mywebpage.com i want the link from thescrips www.thescripts.com

the same function is useful for this?
No - that's cross-domain scripting, which isn't allowed.
Dec 30 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

7
by: lawrence | last post by:
In my style sheet I've set the links like this: a:link{ text-decoration:none; } I did that for the pseudo classes and I also did that for the image tag. Yet there are still link lines...
2
by: mike | last post by:
Hello, Can someone tell me why when I test this link on my webpage it won't work and when I try it out on my hard disk the link works. <link rel="stylesheet" href="rmenu.css" type="text/css"> All...
2
by: mick79 | last post by:
hello, here's my problem, I'm using navigationbuttons in html code with the tag <button> in order to use them as a link to a new website I should use Java. I've succeeded in making the link work...
0
by: vishalgupta | last post by:
working on c#,asp.net i want to create a hyperlink on a webpage which shows address of some other url in the status bar when the mouse is rolled over tthe link and directs the link to sum other...
9
by: newbiegalore | last post by:
Hello everyone :-) , Thanks to the gentle people on this group for helping me out with previous issues. :-D This time round I am facing what I perceive as a simple problem, which I have not found...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.