<form class="myForm" id="propertyForm"> <div class="form_title"> 属性设置 <span id="close" style="float:right;">X</span> </div> <div class="form_content"> <table> <tr> <td class="th">分支流量低限值:</td> <td><input type="text" style="width:120px" id="ele_min"/></td> </tr> <tr> <td class="th">分支流量高限值:</td> <td><input type="text" style="width:120px" id="ele_max"/></td> </tr> <tr> <td class="th">制程进度:</td> <td><input type="text" style="width:120px" id="ele_schedule"/></td> </tr> <tr> <td class="th">在制品标识类型:</td> <td> <select id="ele_logoType"> <option value="0">在制品容器标识</option> <option value="1">制品容器标识</option> </select> </td> </tr> </table> </div> <div class="form_btn_div"> <input type="reset" value="重置"/> <input type="button" value="确定" onclick="alert(demo.$focus)"/> </div> </form>
下面的是鼠标点击事件中添加的代码:
var div = $("#propertyForm"); if (div.is(":hidden")) { div.show(); div.css("left", document.body.scrollLeft + event.clientX + 1); div.css("top", document.body.scrollLeft + event.clientY + 10); } else { div.hide(); }