473,387 Members | 1,899 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,387 software developers and data experts.

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 1899
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

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

Similar topics

31
by: wallster | last post by:
please keep the flaming to a minimum (a bucket of water is next to me) but I have a question someone here might be able to explain in basic terms for a dunce like me. I helped a friend put...
2
by: NewTel | last post by:
I'm only, it seems allowed to insert my javascript in the master page. Yet I only want it to run for one of my content pages. How to handle. Thanks
3
by: CharlesA | last post by:
This is not really a problem I'm having it's more of a general question if you had an html page with embedded javascript script and you sent it to the browser if the script wasn't buggy, it...
1
by: rockdale | last post by:
Hi, I have a page which use a masterpage. And I put a javascript in this page like below: <%@ Page Language="C#" MasterPageFile="~/SITE.master" CodeFile="TEST.aspx.cs" Inherits="TEST_aspx"...
2
by: harpreet1433 | last post by:
problem is i have java StringBuffer i want to print it with javascript on jsp page i tried it like var s= <%=StringBuffer object %>; document.write(s); but nt wrking
7
by: petermichaux | last post by:
Hi, I have tried the following based on suggestions of the best way to insert JavaScript into a page. This is instead of using eval(). Unfortunately IE says "unexpected call to property or...
0
by: Tuhin | last post by:
Hi, In short I want to call a javascript function in a .js file from an aspx page while loading. here is the code <script type="text/javascript">// <!--...
2
by: gomzi | last post by:
hi, I would like to know as to how one could call a javascript function on page load. I would not like to call it through onload attribute that one can specify in the body because i am passing...
2
by: aryan | last post by:
hello to all I want to execute my own javascript whenever any page get downloaded. Actually i want to design a javascript which add some restriction to the pages and this script should be...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

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.