I want to pass the src url of a image via javascript function.
<head>
<script>
function myFunction() {
var str1 = "somepictureurl.png";
return str1;
}
</script>
</head>
<body>
<img src="myFunction()" alt="notworking">
</body>
Unfortunately it is not working and the alt "notworking" is displaying.