PHP速学视频免费教程(入门到精通)
PHP怎么学习?PHP怎么入门?PHP在哪学?PHP怎么学才快?不用担心,这里为大家提供了PHP速学教程(入门到精通),有需要的小伙伴保存下载就能学习啦!
这个功能的实现主要使用了jsonp跨域访问, 然后通过回调函数来将搜索到的关联内容显示出来 。
JSONP(JSONwith Padding)是一个非官方的协议,它允许在服务器端集成Script tags返回至客户端,通过javascript callback的形式实现跨域访问(这仅仅是JSONP简单的实现形式)。
回调函数:当一个函数作为另一个函数的参数时,那么这个函数就是回调函数。
效果如下
nbsp;html> <meta><title></title><style> *{ margin:0; padding:0; } #wei{ width:500px; height:600px; border:0px solid gray; position: relative; margin: 300px auto; } #text{ width:476px; height:50px; line-height: 50px; padding-left:20px; font-size: 16px; position: absolute; } #list{ height:auto; border:1px solid #ccc; display: none; position: absolute; top: 53px; } #wei ul li{ width:498px; height:30px; line-height: 30px; text-indent:10px; font-size: 16px; list-style: none; color: #000; } #wei ul li a{ text-decoration:none; color: #000; } #wei ul li:hover{ display:block; background:#ccc; color:#fff; } #btn{ width: 80px; height: 54px; background: deepskyblue; outline: none; border: 0; position: absolute; left: 500px; color: #fff; } p{ height: 58px; } </style> <p> </p><p> <input> <input> </p>
已抢7337个
抢已抢95475个
抢已抢14942个
抢已抢52732个
抢已抢195934个
抢已抢87512个
抢