2013-11-02 53 views
0

即時通訊使用jQuery用戶界面按鈕,我想指向它特定的網址。 這怎麼可能?jQuery用戶界面按鈕url

<button>Button</button> 

<script> 
$(function() { 
$("input[type=submit], button") 
.button() 
.click(function(event) { 
event.preventDefault(); 
}); 
}); 
</script> 
+0

你是哪個jQuery UI的控制using..and你只想要重定向? –

回答

0

HTML:

<button id="btYourButton">Button</button> 

的Javascript:

<script> 
    $(function() { 
     $("#btYourButton").button().click(function(event) { 
      window.location = "http://google.com" 
     }); 
    }); 
</script>