Following is my code :
<div id="accept" style="background-color:#83CC3F;"></div>
<script type="text/javascript" >
function accept1() {
return document.getElementById('accept').style.backgroundColor;
}
</script>
<?php
$js=<<<EOF
<script type="text/javascript" >
document.write(accept1());
</script>
EOF;
echo $js;
if($js == "rgb(131, 204, 63)") //rgb(131, 204, 63) rgb equivalent of hex code #83CC3F
{
echo "yes";
}
?>
Above code doesn't return "yes" whereas $js=rgb(131, 204, 63) , Please solve my problem