
HTML,JavaScript ajax
<html>
<title>Degerle</title>
<script>
function Degerle(ifade){
var desen = /<script>(.*?)<\/script>/;
var sonuc = ifade.match(desen);
if(sonuc){
eval(sonuc[1]);
ifade = ifade.replace(desen,”);
return Degerle(ifade);
}
return ifade;
}
function Goster(){
var icerik =
‘<sc’+’ript>mesaj=”Ben sayfaya sonradan eklenmiş mesajım”;</sc’+’ript>’+
‘<input type=”button” value=”Mesaj” onclick=”alert(mesaj)”>’;
document.getElementById(‘icerik’).innerHTML = Degerle(icerik);
}
</script>
<body>
<div id=”icerik”></div>
<input type=”button” value=”Goster” onclick=”Goster()”>
</body>
</html>
//————————————————————————————
//KAYAN YAZI
<MARQUEE>
Hi There! <IMG SRC=”graphics/idocs.gif” HEIGHT=33 WIDTH=82 ALT=”Idocs Guide to HTML”>
</MARQUEE>
//—————————————————————————————
//ie7 yi destektelyen request
var xmlRequest;
try
{ // Firefox, Opera 8.0+, Safari
xmlRequest=new XMLHttpRequest();
}
catch (e)
{ // Internet Explorer
try
{
xmlRequest=new ActiveXObject(“Msxml2.XMLHTTP”);
}
catch (e)
{
try
{
xmlRequest=new ActiveXObject(“Microsoft.XMLHTTP”);
}
catch (e)
{
alert(“Your browser does not support AJAX!”);
return false;
}
}
}
//———————————————————————————-
//php için javascript fonksiyonu çalıştırma
<a href=\”javascript:reg_add(‘$sid’)\”>KAYDET </a>
//————————————————–
//PHP replace
$oda[$i]=str_replace(‘p’,’+’,mysql_result($sonuc,$i,’oda’ ));
//—————————————————————–
//Javascript date
var v_day = saat.getDate();
(v_day < 10) ? v_day = ‘0’+v_day : v_day = v_day;
var v_month = saat.getMonth();
(v_month < 10) ? v_month = ‘0’+v_month : v_month = v_month;
var v_ilanTarihi=v_day+’.’+v_month+’.’+saat.getYear();//alert(v_ilanTarihi);
document.getElementById(‘ilanTarihi’).value = v_ilanTarihi;
//———————————————————————————–
//html boşluk  
//Javascrip tablo renk değiştirici ve işaretçi icon nunu el yapma
onMouseOver=\”this.bgColor=’gold’;\” onMouseOut=\”this.bgColor=’#FFFFFF’;\” style=’cursor: pointer; cursor: hand;’
//———————————————————————————————————————
//Javascript cursor icon change
<style type=”text/css”>
body{
cursor: url(mycursor.cur)
}
</style>
<div style=”cursor: move; width: 200px; height: 200px”></div>
<a href=”help.htm” style=”cursor: help;”>Help</a>In this second example, the entire DIV has a cursor of “move”, and the
<body onSelectStart=”this.style.cursor=’not-allowed’; return false;”
onMouseup=”this.style.cursor=’default'”>
//—————————————————————————-[:en]HTML,JavaScript ajax
<html>
<title>Degerle</title>
<script>
function Degerle(ifade){
var desen = /<script>(.*?)<\/script>/;
var sonuc = ifade.match(desen);
if(sonuc){
eval(sonuc[1]);
ifade = ifade.replace(desen,”);
return Degerle(ifade);
}
return ifade;
}
function Goster(){
var icerik =
‘<sc’+’ript>mesaj=”I added my post to the page”;</sc’+’ript>’+
‘<input type=”button” value=”Mesaj” onclick=”alert(mesaj)”>’;
document.getElementById(‘icerik’).innerHTML = Degerle(icerik);
}
</script>
<body>
<div id=”icerik”></div>
<input type=”button” value=”Goster” onclick=”Goster()”>
</body>
</html>
//————————————————————————————
//KAYAN YAZI
<MARQUEE>
Hi There! <IMG SRC=”graphics/idocs.gif” HEIGHT=33 WIDTH=82 ALT=”Idocs Guide to HTML”>
</MARQUEE>
//—————————————————————————————
//ie7 yi destektelyen request
var xmlRequest;
try
{ // Firefox, Opera 8.0+, Safari
xmlRequest=new XMLHttpRequest();
}
catch (e)
{ // Internet Explorer
try
{
xmlRequest=new ActiveXObject(“Msxml2.XMLHTTP”);
}
catch (e)
{
try
{
xmlRequest=new ActiveXObject(“Microsoft.XMLHTTP”);
}
catch (e)
{
alert(“Your browser does not support AJAX!”);
return false;
}
}
}
JavaScript function execution for php
<a href=\”javascript:reg_add(‘$sid’)\”>KAYDET </a>
//————————————————–
//PHP replace
$oda[$i]=str_replace(‘p’,’+’,mysql_result($sonuc,$i,’oda’ ));
//—————————————————————–
//Javascript date
var v_day = saat.getDate();
(v_day < 10) ? v_day = ‘0’+v_day : v_day = v_day;
var v_month = saat.getMonth();
(v_month < 10) ? v_month = ‘0’+v_month : v_month = v_month;
var v_ilanTarihi=v_day+’.’+v_month+’.’+saat.getYear();//alert(v_ilanTarihi);
document.getElementById(‘ilanTarihi’).value = v_ilanTarihi;
//———————————————————————————–
//html space  
//Javascript table color changer and pointer icon nunu handmade
onMouseOver=\”this.bgColor=’gold’;\” onMouseOut=\”this.bgColor=’#FFFFFF’;\” style=’cursor: pointer; cursor: hand;’
//———————————————————————————————————————
//Javascript cursor icon change
<style type=”text/css”>
body{
cursor: url(mycursor.cur)
}
</style>
<div style=”cursor: move; width: 200px; height: 200px”></div>
<a href=”help.htm” style=”cursor: help;”>Help</a>In this second example, the entire DIV has a cursor of “move”, and the
<body onSelectStart=”this.style.cursor=’not-allowed’; return false;”
onMouseup=”this.style.cursor=’default'”>
//—————————————————————————
Bir Cevap Yazın