javascript function
how to use function?
![](https://images.cnblogs.com/OutliningIndicators/ContractedBlock.gif)
<html> <head> <script type="text/javascript" > function display(){ document.location.href="http://www.baidu.com" } </script> </head> <body> <input type="button" value="test" onmouseover="display()"> </body> </html>