当前位置: 技术问答>java相关
如何实现JSP页面间参数的传递?
来源: 互联网 发布时间:2015-02-19
本文导语: 有2个JSP页面(都是打开的),其中一个页面的文本框输入后,点一个button后,关掉此页面.另一个页面的一个文本框也要显示上一个页面文本框的值.如何做? 有代码吗? (不用script) | 把我这个例子看明...
有2个JSP页面(都是打开的),其中一个页面的文本框输入后,点一个button后,关掉此页面.另一个页面的一个文本框也要显示上一个页面文本框的值.如何做?
有代码吗?
(不用script)
有代码吗?
(不用script)
|
把我这个例子看明白了,这个问题就解决了:
opener.htm:
function setColor()
{
var mycolor=showModalDialog("color.htm","ColorSelector","dialogHeight:240px;dialogWidth:340px;center:Yes;help:No;resizable:No;status:No"
);
if(mycolor){
document.forcolor.thecolor.value=mycolor;
document.forcolor.thecolor.style.backgroundColor=mycolor;
}
else{
document.forcolor.thecolor.value="#000000";
}
}
//////////////////////////////////////////////////////////
color.htm:
Color Picker
Basic:
opener.htm:
function setColor()
{
var mycolor=showModalDialog("color.htm","ColorSelector","dialogHeight:240px;dialogWidth:340px;center:Yes;help:No;resizable:No;status:No"
);
if(mycolor){
document.forcolor.thecolor.value=mycolor;
document.forcolor.thecolor.style.backgroundColor=mycolor;
}
else{
document.forcolor.thecolor.value="#000000";
}
}
//////////////////////////////////////////////////////////
color.htm:
Color Picker
Basic:
var hex = new Array(16);
hex[0]="000000";
hex[1]="ffffff";
hex[2]="808080";
hex[3]="c0c0c0";
hex[4]="ff0000";
hex[5]="008000";
hex[6]="0000ff";
hex[7]="ffff00";
hex[8]="800080";
hex[9]="808000";
hex[10]="000080";
hex[11]="00ffff";
hex[12]="00ff00";
hex[13]="800000";
hex[14]="008080";
hex[15]="ff00ff";
var additional = new Array(256);
additional[0]="006400";
additional[1]="191970";
additional[2]="696969";
additional[3]="708090";
additional[4]="778899";
additional[5]="00008b";
additional[6]="0000cd";
additional[7]="008b8b";
additional[8]="00bfff";
additional[9]="00ced1";
additional[10]="00fa9a";
additional[11]="00ff7f";
additional[12]="00ffff";
additional[13]="1e90ff";
additional[14]="20b2aa";
additional[15]="228b22";
additional[16]="2e8b57";
additional[17]="2f4f4f";
additional[18]="32cd32";
additional[19]="3cb371";
additional[20]="40e0d0";
additional[21]="4169e1";
additional[22]="4682b4";
additional[23]="483d8b";
additional[24]="48d1cc";
additional[25]="4b0082";
additional[26]="556b2f";
additional[27]="5f9ea0";
additional[28]="6495ed";
additional[29]="66cdaa";
additional[30]="6a5acd";
additional[31]="6b8e23";
additional[32]="7b68ee";
additional[33]="7cfc00";
additional[34]="7fff00";
additional[35]="7fffd4";
additional[36]="87ceeb";
additional[37]="87cefa";
additional[38]="8a2be2";
additional[39]="8b0000";
additional[40]="8b008b";
additional[41]="8b4513";
additional[42]="8fbc8b";
additional[43]="90ee90";
additional[44]="9370db";
additional[45]="9400d3";
additional[46]="98fb98";
additional[47]="9932cc";
additional[48]="9acd32";
additional[49]="a0522d";
additional[50]="a52a2a";
additional[51]="a9a9a9";
additional[52]="add8e6";
additional[53]="adff2f";
additional[54]="afeeee";
additional[55]="b0c4de";
additional[56]="b0e0e6";
additional[57]="b22222";
additional[58]="b8860b";
additional[59]="ba55d3";
additional[60]="bc8f8f";
additional[61]="bdb76b";
additional[62]="c71585";
additional[63]="cd5c5c";
additional[64]="cd853f";
additional[65]="d2691e";
additional[66]="d2b48c";
additional[67]="d3d3d3";
additional[68]="d8bfd8";
additional[69]="da70d6";
additional[70]="daa520";
additional[71]="db7093";
additional[72]="dc143c";
additional[73]="dcdcdc";
additional[74]="dda0dd";
additional[75]="deb887";
additional[76]="e0ffff";
additional[77]="e6e6fa";
additional[78]="e9967a";
additional[79]="ee82ee";
additional[80]="eee8aa";
additional[81]="f08080";
additional[82]="f0e68c";
additional[83]="f0f8ff";
additional[84]="f0fff0";
additional[85]="f0ffff";
additional[86]="f4a460";
additional[87]="f5deb3";
additional[88]="f5f5dc";
additional[89]="f5f5f5";
additional[90]="f5fffa";
additional[91]="f8f8ff";
additional[92]="fa8072";
additional[93]="faebd7";
additional[94]="faf0e6";
additional[95]="fafad2";
function display(triplet) {
returnValue='#' + triplet;
close();
}
function drawCell(color) {
document.write('')
}
function drawRow(color) {
document.write('')
for (var i = 0; i