[jQuery] Question: select/option to open a new webpage, howto?

[jQuery] Question: select/option to open a new webpage, howto?


Hi, folks:
I am trying to use select/option to open a new window and whenever I
click an item from the selection dropdown list... for example, the
following sample:
<select name="test">
<option value="/link/to/v1">value-1</option>
<option value="/link/to/v2">value-2</option>
<option value="/link/to/v3">value-3</option>
<option value="/link/to/v4">value-4</option>
</select>
when I select value-3, a new window will be opened, and the content is
pointed to "http://mysite.com/link/to/v3". just like <a href="/link/to/
v3" target="_blank">value-3</a>
How to handle this with jQuery?
I can do:
<script type="text/javascript">
$('select[name=test] option').each(function(i) {
$(this).click(function(){
/* how to open a new link $(this).val() */
});
});
</script>
many thanks,
lihao