<SCRIPT src="2/jquery-1.3.2.min.js" type=text/javascript></SCRIPT>
<SCRIPT src="2/dialog.js" type=text/javascript></SCRIPT>
<script type="text/javascript">
var CONTEXTPATH = "2/img/"; //设置图片路径
//弹出窗口
function WindowOpen(id, title, url, property, width, heigh) {
var diag = new Dialog("Diag2");
diag.Width = width;
diag.Height = heigh;
diag.Title = title;
diag.URL = url;
diag.OKEvent = function() {
$("#" + id).val($(getPopup('Diag2')).find("#dataList tr.selected").attr(property));
diag.close();//关闭弹出窗
$("#" + id).focus();
}; //点击确定后调用的方法
diag.show();
}
</script>
<SCRIPT src="2/dialog.js" type=text/javascript></SCRIPT>
<script type="text/javascript">
var CONTEXTPATH = "2/img/"; //设置图片路径
//弹出窗口
function WindowOpen(id, title, url, property, width, heigh) {
var diag = new Dialog("Diag2");
diag.Width = width;
diag.Height = heigh;
diag.Title = title;
diag.URL = url;
diag.OKEvent = function() {
$("#" + id).val($(getPopup('Diag2')).find("#dataList tr.selected").attr(property));
diag.close();//关闭弹出窗
$("#" + id).focus();
}; //点击确定后调用的方法
diag.show();
}
</script>
在点击事件中设置下对应的属性就可以啦
<input type="button" id="btntest" onclick='WindowOpen("btntest", "Test", "Default.aspx", "id")' value="Click" />
/Files/hantianwei/tanchuang.rar