日期:2014-05-16 浏览次数:20438 次
(function ($) {
$(document).ready(function () {
$('body').append('<table id="tipTable" class="tableTip"><tr><td class="leftImage"></td> <td class="contenImage" align="left"></td> <td class="rightImage"></td></tr></table>');
var dataName = "Product";
var checkSubmit = (function () {
$.ajax({
url: "validate.xml",
dataType: "xml",
type: 'get',
error: function (xml) {
alert('Error loading XML document' + xml);
},
success: function (xml) {
$(xml).find("Data[Name='" + dataName + "']").find("Item").each(function () {
var name = $(this).attr("Name");
var isNull = $(this).attr("IsNull");
var reg = $(this).attr("Reg");
var tip = $(this).attr("Tip");
//给对应的元素添加focus事件以及blur事件
$("#" + name).mouseover(function () {
if (tip != "") {
$('#tipTable').css({ left: $.getLeft(this) + 'px', top: $.getTop(this) + 'px' });