469,320 Members | 2,189 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,320 developers. It's quick & easy.

How to javascript at the address bar of an webpage page

Can you tell me how the java script works when i write the script at the address bar of any web page. How it effect the execution of that perticular web page at which i write the script at the address bar ?
May 27 '10 #1
3 1714
gits
5,390 Expert Mod 4TB
could you explain a bit more what you mean?

when you type:
Expand|Select|Wrap|Line Numbers
  1. javascript:alert('foo');
it just shows an alert ... nothing more ... and doesn't affect the page at all ... when you type:
Expand|Select|Wrap|Line Numbers
  1. javascript:document.getElementsByTagName('body')[0].style.display='none';
then the body will be hidden and so it affects the page. so what you type and want to affect ... will be affected.

kind regards
May 27 '10 #2
@gits
if i write this script how its work.......
Expand|Select|Wrap|Line Numbers
  1. javascript:alert("Wait for few seconds for pic`s to load......");
  2. nb= document.all[0].innerHTML.match(/[0-9]*.jpg\)/g);nb=parseInt(nb);
  3. document.body.innerHTML="<center><span style="'font-size:100'"><b>anag script<br /></b>SCRIPT BYAnag Johari</a></span>";
  4. for(i=1;i<=100;i++){document.body.innerHTML+='<img src="http://img3.orkut.com/images/milieu/'+i+'/0/'+nb+'.jpg" /><br /><br /><br /><br />';};void(0)
  5.  
what it impact on the webpage .
i type this at the address bar of an page.
Thank you
May 27 '10 #3
gits
5,390 Expert Mod 4TB
basically it shows some images on a loaded page ... but only for the moment ... it will not affect the page at all (at least not permanently) ... just its current (local) representation ...

what do you expect that it should do?
May 27 '10 #4

Post your reply

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

Similar topics

31 posts views Thread by wallster | last post: by
2 posts views Thread by NewTel | last post: by
3 posts views Thread by CharlesA | last post: by
1 post views Thread by rockdale | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by suresh191 | last post: by
reply views Thread by mdpf | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.