156
rated 0 times
[
157]
[
1]
/ answers: 1 / hits: 27575
/ 11 Years ago, fri, june 21, 2013, 12:00:00
I am new to JavaScript.
I have a javascript function which return me country name. Now I have to place this value in the src of iframe. My JavaScript function is as follows:
<script type=text/javascript>
var country = $(#SCountry).val();
function getCountry()
{
var country = $(#SCountry).val();
return country;
}
</script>
I am getting the country value but can't incorporate it in the src of iframe. My iframe src is as follows:
src='https://example.com/?country=javascript:getCountry()'
It's not working.
More From » html