<script type='text/javascript' src='__ROOT__/Public/js/opentip-jquery.js'></script>
<link href="__ROOT__/Public/css/opentip.css" rel="stylesheet" type="text/css" />
首先引入js跟css样式
<input id="username" name="username" type="text"placeholder="请输入用户名" class="urs" />
var myInput = $("#username");
var op = new Opentip(myInput, "asdsadsad", { style: "alert", target: true, tipJoint: "left", targetJoint: "right", containInViewport: false });
op.show();
这样就可以简单的显示出来了,更多方法以及样式请参考http://www.opentip.org/