help with dynamically changing div style

help with dynamically changing div style

Hi, i'm new to jquery and am not real familiar with javascript. I have a color picker on my page that puts the hex value in an input box. I'm not familiar with jquery or javascript in general. I would like to be able to take the hex value and use it in updating a style of a div onkeyup or onchange...say the border color for example. Something like this...but this isn't working....have any ideas?


<input type="text" id="colorfield1" onFocus="ddcolorposter.
echocolor(this, 'colorbox1')"> <div id="colorbox1" class="colorbox"></div>

<br><br>
<div id="testbox"> Some Text </div>

<script>
    $("#colorfield1").keyup(function () {
      var value = $(this).val();
      $("#testbox").style.border="1px solid #"+ value;
    }).keyup();
</script>