如果使用javascript检查复选框,如何重定向到特定链接?如果使用javascript检查复选框,如何重定向到特定链接?
我这样做,但它不是为我工作..
<input type="checkbox" name="yousendit" id="yousendit" value="1" onselect="return yousendit();"/>
<script type=javascript>
function yousendit()
{
if(document.getElementById('yousendit').checked== "checked")
{
window.location='https://www.yousendit.com/dropbox?dropbox=mydomain';
return false;
}
return true;
}
</script>
请帮