CITANIE COOKIE

ID
NAZOV SKRIPTU:
POPIS CINNOSTI:
DLZKA:
TESTOVANE POD:

 

028
p028.html / p028.zip
Precita obsah cookie
854b
NN 4.01, IE 4.0

UKAZKA

Zdrojovy tvar:

<html>
<
head>
<
title>
JavaScript DESTINATION - P028
<
/title>
<
script>
<!--
cookie_name = getCookie("bevo")
function getCookie(Name) {
var search = Name + "="
if (document.cookie.length > 0) {
offset = document.cookie.indexOf(search)
if (offset != -1) {
offset += search.length
end = document.cookie.indexOf(";", offset)
if (end == -1)
end = document.cookie.length
return unescape(document.cookie.substring(offset, end))
}
}
}
// -->
<
/script>
<
/head>
<
BODY>
<
FORM name=cookie-getter>
<
table>
<
tr><td>
<
INPUT TYPE="button" NAME="button" Value="Precitaj Cookie" onClick="alert(document.cookie.substring(offset, end))">
<
/td></tr>
<
/table>
<
/form>
<
/body>
<
/html>
[ Navrat ]