i have 2 html text input so if in first one i put this link https://example.com/E-LrapH4RtQ&list=PLy0zopi719kGIefv799akiQ7uh-8ntNXt
it will be https://example.com/E-LrapH4RtQ
so now i want in second html input value to be E-LrapH4RtQ
<script language="javascript" type="text/javascript">
function removeytb(string) {
return string.split('&')[0];
}
</script>
<input type="text" name="ytburl" onblur="this.value=removeytb(this.value);" />
<input type="text" name="name1" value="" />