LunarEclipse
Static Analysis Expert
2
MONTHS
2 2 MONTHS OF SERVICE
LEVEL 1
400 XP
Personal Count Total Visited tallies and displays the number of visitors by the current page. It will use cookies to accomplish this task. The number of visitors in your site will be counted automatically through this script. You will know the number of people who visits your site.
Example:
Count Total Visited
You have visited this page times.
(Reload page to see it works)
Directions:
First: Kindly add the code below to the HEAD section of your page.
Second: Where you want the Personal Count Total Visited appear in your page, kindly insert this script.
You have visited this page <script
type
=
"text/javascript"
lang
=
"Eng"
>
page_countvisit(count_num);</
script
>
times.
Download
Example:
Count Total Visited
You have visited this page times.
(Reload page to see it works)
Directions:
First: Kindly add the code below to the HEAD section of your page.
- <style type=
"text/css"
>
- .counter_style
{
- background-color
:
black
;
- color
:
cyan
;
- font-weight
:
bold
;
- }
- p {
- font-size
:
18px
;
- font-weight
:
bold
;
- {
- </style>
- <
script type=
"text/javascript"
lang=
"Eng"
>
- expireDate =
new
Date
- expireDate.setMonth
(
expireDate.getMonth
(
)
+
6
)
- count_num =
eval(
cookieVal(
"counter_style_Visited"
)
)
- count_num++
- document.cookie
=
"counter_style_Visited="
+
count_num+
";expires="
+
expireDate.toGMTString
(
)
- function
cookieVal(
cookieName)
{
- thisCookie =
document.cookie
.split
(
"; "
)
- for
(
i=
0
;
i<
thisCookie.length
;
i++
)
{
- if
(
cookieName ==
thisCookie[
i]
.split
(
"="
)
[
0
]
)
{
- return
thisCookie[
i]
.split
(
"="
)
[
1
]
- }
- }
- return
0
- }
- function
page_countvisit(
)
{
- for
(
i=
0
;
i<
(
7
-
count_num.toString
(
)
.length
)
;
i++
)
- document.write
(
'<span class="counter_style">0</span>'
)
- for
(
y=
0
;
y<
(
count_num.toString
(
)
.length
)
;
y++
)
- document.write
(
'<span class="counter_style">'
+
count_num.toString
(
)
.charAt
(
y)
+
'</span>'
)
- }
- </
script>
Second: Where you want the Personal Count Total Visited appear in your page, kindly insert this script.
You have visited this page <script
type
=
"text/javascript"
lang
=
"Eng"
>
page_countvisit(count_num);</
script
>
times.
Download
You must upgrade your account or reply in the thread to view hidden text.