/*1.弹出消息*/ function aler($msg) { echo "<script language=javascript>"; echo "alert(\"$msg\");"; echo "</script>"; } /*2.弹出消息后,返回之前页面或跳转到指定网页*/ function msge($msg,$goto='') { echo "<script language=javascript>"; echo "alert(\"$msg\");"; if(!empty($goto)) echo "location=\"$goto\";"; else echo "history.go(-1);"; echo "</script>"; } /*3.延迟指定秒数后跳转到指定网页*/ function goto($tim,$goto) { echo "<meta http-equiv=\"Refresh\" content=".$tim.";URL=".$goto.">"; } /************************ //应用示例 aler("感谢浏览!"); msge("抱歉,需要重来!"); msge("欢迎访问!","http://yun.widuu.com"); goto(5,"http://yun.widuu.com"); ************************/欢迎转载,转载请注明来自微度网络-网络技术中心http://yun.widuu.com
发表评论 取消回复