function copy(k) {
var m = k;
var cp = document.getElementById(m);
if (typeof (cp.innerContent) == 'undefined') text = cp.innerText
else text = cp.innerContent
if (document.all) { //IE
window.clipboardData.setData("Text", text);
alert('您已经成功复制代码!');
} else { //FIREFOX
alert('该浏览器下不支持剪贴板,请用鼠标复制');
}
}
function jump(textAreaName) {
if (textAreaName == "dm1") {
var ww = document.getElementById("wd1").value;
var hh = document.getElementById("hg1").value;
var optionValue = document.getElementById("city1Select").value;
document.getElementById("iframe1").width=ww;
document.getElementById("iframe1").height=hh;
document.getElementById("iframe1").src = "plugin/"+optionValue + "ForecastPlugin1.html";
$("#dm1").text("");
} else if (textAreaName == "dm2") {
var ww = document.getElementById("wd2").value;
var hh = document.getElementById("hg2").value;
var optionValue = document.getElementById("city2Select").value;
document.getElementById("iframe2").width = ww;
document.getElementById("iframe2").height = hh;
document.getElementById("iframe2").src = "plugin/" + optionValue + "ForecastPlugin2.html";
$("#dm2").text("");
} else if (textAreaName == "dm3") {
var ww = document.getElementById("wd3").value;
var hh = document.getElementById("hg3").value;
var optionValue = document.getElementById("city3Select").value;
document.getElementById("iframe3").width = ww;
document.getElementById("iframe3").height = hh;
document.getElementById("iframe3").src = "plugin/" + optionValue + "ForecastSevenPlugin1.html";
$("#dm3").text("");
} else if (textAreaName == "dm3_2") {
var ww = document.getElementById("wd3_2").value;
var hh = document.getElementById("hg3_2").value;
var optionValue = document.getElementById("city3_2Select").value;
document.getElementById("iframe3_2").width = ww;
document.getElementById("iframe3_2").height = hh;
document.getElementById("iframe3_2").src = "plugin/" + optionValue + "ForecastThreePlugin1.html";
$("#dm3_2").text("");
}
else if (textAreaName == "one_1") {
var ww = document.getElementById("wdone_1").value;
var hh = document.getElementById("hgone_1").value;
document.getElementById("iframeone_1").width = ww;
document.getElementById("iframeone_1").height = hh;
$("#one_1").text("");
}
else if (textAreaName == "dm4") {
var ww = document.getElementById("wd4").value;
var hh = document.getElementById("hg4").value;
var optionValue = document.getElementById("city4Select").value;
document.getElementById("iframe4").width = ww;
document.getElementById("iframe4").height = hh;
document.getElementById("iframe4").src = "plugin/" + optionValue + "ForecastSevenPlugin2.html";
$("#dm4").text("");
} else if (textAreaName == "dm5") {
var ww = document.getElementById("wd5").value;
var hh = document.getElementById("hg5").value;
document.getElementById("iframe5").width = ww;
document.getElementById("iframe5").height = hh;
$("#dm5").text("");
} else if (textAreaName == "dm6") {
var ww = document.getElementById("wd6").value;
var hh = document.getElementById("hg6").value;
document.getElementById("iframe6").width = ww;
document.getElementById("iframe6").height = hh;
$("#dm6").text("");
}
}