Search
Search titles only
By:
Search titles only
By:
Log in
Register
Search
Search titles only
By:
Search titles only
By:
Menu
Install the app
Install
Forums
New posts
All threads
Latest threads
New posts
Trending threads
Trending
Search forums
What's new
New posts
New ads
New profile posts
Latest activity
Free Ads
Latest reviews
Search ads
Members
Current visitors
New profile posts
Search profile posts
Contact us
Latest ads
🔒 NordVPN Premium – 3 Months
hrdilshan
Updated:
11 minutes ago
🚀 Microsoft Office 365 Pro Plus – Lifetime Access! 🚀
hrdilshan
Updated:
12 minutes ago
Linkedin Premium Business / Careere /Sales Navigator - 1/2/3/6/9/12 Months - Reddem Link
hrdilshan
Updated:
13 minutes ago
Colombo
YEYE 3 in 1 Instant Coffee Mix 50 Sachet
Romeshka
Updated:
Yesterday at 12:16 AM
Colombo
Red Hat Certified System Administrator (RHCSA) - RHEL 10
Sanjeewani95
Updated:
Friday at 7:43 PM
Electronics
Vehicles
Property
Search
Reply to thread
Forums
Computers & Internet
Software Development
More Help!!!!
Get the App
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Message
<blockquote data-quote="deffa" data-source="post: 3553" data-attributes="member: 57"><p>[CODE]<SCRIPT></p><p>function getname(){</p><p>//this is the name of the function</p><p>var thiscookie=document.cookie;</p><p>//this retrieves the cookie</p><p>var location=thiscookie.indexOf("surfername=");</p><p>//this is the location of where the information starts</p><p>var endlocation=thiscookie.indexOf(":");</p><p>//this is the location of the end of the information</p><p>if (location != -1){</p><p>//this checks to see if the cookie exists</p><p>var begin=location+11;</p><p>//this gets the location of the begining of the surfer's name</p><p>var yourname=thiscookie.substring(begin, endlocation);</p><p>//this grabs the value from the cookie</p><p>yourname = unescape(yourname);</p><p>//this unencodes the surfer's name</p><p>return yourname;</p><p>//this returns the surfer's name</p><p>}</p><p>else{</p><p>var yourname = prompt("Welcome, please enter in your name.",'');</p><p>//this asks for the name</p><p>document.cookie = "surfername=" + escape(yourname)+":" + "expires=Fri Dec 10 11:00:00 PST 1999";</p><p>// the above line sets the cookie with a name=value pair of surfername=value</p><p>// you may modify the expiration date by changing the expires=</p><p>}</p><p>return yourname; //this returns the surfer's name</p><p>}</p><p></SCRIPT> [/CODE]</p><p></p><p>part to of the script</p><p></p><p>[CODE]<SCRIPT> </p><p>document.write("Welcome to my site, " + getname() + "!"); </p><p></SCRIPT>[/CODE]</p><p></p><p></p><p></p><p>hey how can i change the font colour and font size in this script...</p></blockquote><p></p>
[QUOTE="deffa, post: 3553, member: 57"] [CODE]<SCRIPT> function getname(){ //this is the name of the function var thiscookie=document.cookie; //this retrieves the cookie var location=thiscookie.indexOf("surfername="); //this is the location of where the information starts var endlocation=thiscookie.indexOf(":"); //this is the location of the end of the information if (location != -1){ //this checks to see if the cookie exists var begin=location+11; //this gets the location of the begining of the surfer's name var yourname=thiscookie.substring(begin, endlocation); //this grabs the value from the cookie yourname = unescape(yourname); //this unencodes the surfer's name return yourname; //this returns the surfer's name } else{ var yourname = prompt("Welcome, please enter in your name.",''); //this asks for the name document.cookie = "surfername=" + escape(yourname)+":" + "expires=Fri Dec 10 11:00:00 PST 1999"; // the above line sets the cookie with a name=value pair of surfername=value // you may modify the expiration date by changing the expires= } return yourname; //this returns the surfer's name } </SCRIPT> [/CODE] part to of the script [CODE]<SCRIPT> document.write("Welcome to my site, " + getname() + "!"); </SCRIPT>[/CODE] hey how can i change the font colour and font size in this script... [/QUOTE]
Insert quotes…
Verification
Awruddata maasa keeyada?
Post reply
Top
Bottom