?? getcolor.jsp
字號:
<%@page language="java" contentType="text/html;charset=GBK"%>
<%
String name = request.getParameter("name");
String value = request.getParameter("value");
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=GBK">
<title>取得顏色值</title>
<LINK href="../css/main.css" rel=stylesheet>
</head>
<body bgcolor="#E3E3E3" topmargin=0 leftmargin=0>
<applet codebase="./color/" code="ColorPicker.class" width=400 height=400 alt="您的機器沒有合適的java虛擬機">
<param name=nowcolor value="<%=value%>">
您的機器沒有合適的java虛擬機
Java(TM) Plug-in: 版本 1.4.0
使用 JRE 版本 1.4.0 Java HotSpot(TM) Client VM
</applet>
<div align=center>
<input type=button name=dd value="確 定" onclick="show()">
</div>
<script>
var name = "<%=name%>";
var value = "<%=value%>";
function show()
{
if(window.status=="小應用程序ColorPicker started"&&value=="")
{
alert("請選取顏色!");
}
else
{
var choose = window.status;
value = "#"+value;
if(choose=="小應用程序ColorPicker started")choose = value;
window.opener.document.all(name).value = choose;
window.opener.document.all(name).style.background = choose;
window.close();
}
}
</script>
</body>
</html>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -