Merhaba php nin içindeki echo lu kısmı javascript içine yazmak istiyorum. Nasıl yapabilirim. Bir türlü beceremedim
<p id="demo"></p>
<script>
function getScreenWidth()
{
var de = document.body.parentNode;
var db = document.body;
if(window.opera)return db.clientWidth;
if (document.compatMode=='CSS1Compat') return de.clientWidth;
else return db.clientWidth;
}
if(getScreenWidth()>800){
document.getElementById("demo").innerHTML = 'buraya kod gelecek';
}
</script>echo('<script id="cid0020000202695131951" data-cfasync="false" async src="//st.chatango.com/js/gz/emb.js" style="width: 300px;height: 450px;">{"handle":"alikaanbashan","arch":"js","styles":{"a":"#17a2b8","b":100,"c":"000000","d":"000000","e":"ffffff","h":"ffffff","k":"ffccff","l":"ffccff","m":"ffccff","p":"10","q":"ffccff","r":100,"t":0,"sbc":"bbbbbb","surl":0,"cnrs":"0.35","fwtickm":1}}</script>
<br>
<button class="bg-info p-2 text-white rounded mr-2" type="button" onclick="myFunction()">Koyu Yeşil</button>
<button class="bg-info p-2 text-white rounded mr-2" type="button" onclick="myFunctionn()">Siyah</button>
<script>
function chat() {
document.getElementById("chat").classList.remove("sticky-top");
}
function myFunction() {
document.body.style.backgroundColor = "#0B5B55";
document.body.style.color = "wheat";
document.getElementById("ust").style.backgroundColor = "#0B5B55";
}
function myFunctionn() {
document.body.style.backgroundColor = "black";
document.body.style.color = "wheat";
document.getElementById("ust").style.backgroundColor = "black";
}
</script>');