<img id="demo" src="" />
<script>
if (window.innerWidth > 500)
{
}
else
{
}
</script>
This is my code. How to change the value of src depending on the browser width?
<img id="demo" src="" />
<script>
if (window.innerWidth > 500)
{
}
else
{
}
</script>
This is my code. How to change the value of src depending on the browser width?