Good morning, I'm now a beginner in jQuery and I have a problem using iframes and inputs. Here's the situation : I have an input where I can enter (for example) a website, and display it on an iframe. I tried a lot but without a result. Here's my code. I'd appreciate your help guys, thanks a lot !
<head>
<meta charset="utf-8"/>
<title></title>
<link rel="stylesheet" type="text/css" href="">
</head>
<body>
<input type="button" value="GO" onClick="getval()" />
<input type="text" name="url" src="http://www.google.com" id="textframe">
<iframe src="" id="targetframe"></iframe>
<script type="text/javascript" src="jquery/jquery-3.1.1.js"></script>
<script type="text/javascript">
function getvalue() {
var xframe = $("textframe").val();
$("targetframe").attr('src', xframe);
}
</script>
</body>