标签:style os java io strong for ar cti html
第一页
//这个是显示窗口的方法
function frmshow(arr){
var old;
var val =$.trim($("#phone").val());
if (val=="") {
old="";
} else {
old= val +"\n";
}
for ( var int = 0; int < arr.length; int++) {
old = old+arr[int];
}
$("#phone").val(old);
}
function goTo(url){
var targetWndName = "MyWindow";
var wnd = window.open("",targetWndName);
var link = document.getElementById("link");
link.target = targetWndName;
link.href = url;
link.click();
}
第一页html
<a id="link" href="javascript:void(0)" style="visibility:hidden;position:absolute;"></a>
<input type="button" value="选择通讯录" class="btn" onclick="goTo(‘<%=path%>/am/push.do?m=contact‘)">
<textarea name="phone" id="phone" style="width: 100%;height: 100%" rows="15" data-toggle="tooltip" data-placement="right" title="手机号码不能为空"></textarea>
第二页js
var sinit = function(){
var arry = new Array();
$("[name=checkval]:checkbox:checked").each(function() {
arry.push($(this).val()+"\n");
});
window.opener.frmshow(arry);//子窗口调用父窗口的方法
window.close();
}
标签:style os java io strong for ar cti html
原文地址:http://www.cnblogs.com/q446223455/p/3941017.html