I want To include a Php File inside Javascript If statement. My Main Problem is, I want to check device screen size using javascript and include php file according to if statement. code
<script type="text/javascript">
if(screen.width<800){
<?php include 'headermobile.php'; ?>
}else{
<?php include 'upper.php'; ?>
}
</script>
</body>
<html>
Please Help, If another Trick To Do Job please refer code Thank
Aucun commentaire:
Enregistrer un commentaire