How to use custom ajax in worspress

Hai,

i am learning wordpress…

this is my core php code:

function fun5()
{
var id1=document.getElementById(‘city’).value;
$.ajax({
url:‘loaddata.php?id1=’+id1,
complete:function(data)
{
document.getElementById(‘show1’).innerHTML=data.responseText;
}
});
}

So like that i want to implement in WordPress custom pages…,

i tried but in URL not loading …,
any suggestion please…

1 Like
Sponsor our Newsletter | Privacy Policy | Terms of Service