有什么问题请到<a href='/bbs/forums.php?fid=21'><font color=red>论坛</font></a>中发表<br>
<!--# 特效来源:http://www.webjx.com/js -->
<!-- 把如下代码加入<body>区域中 -->
<style>
IMG {border:2px solid black}
BODY{
margin:0;
background:white;
font-family:verdana;
font-size:80%;
}
.bar{
background:#336699;
width:100%;
height:30px;
border-top:1px solid #99CCFF;
border-bottom:1px solid #000000;
}
.desbar{
background:#FFFFFF;
width:100%;
padding: 10px;
border-top:1px solid #CCCCCC;
border-bottom:1px solid #000000;
color:black;
font-size:8pt;
}
.title{
font-size:15pt;
color:white;
padding-left:10px;
}
PRE { margin:0}
a:link
{
text-decoration:none;
color:white
}
a:visited
{
text-decoration:none;
color:white
}
a:active
{
text-decoration:none;
color:white
}
a:hover
{
text-decoration:none;
color:yellow
}
SELECT { font-size:9pt; border:2px; }
</style>
<SCRIPT LANGUAGE="javascript">
var browserCapable = true;// Prevents errors on downlevel browsers
var startImage = "/img/200407101.gif"; // /workshop/graphics/
var endImage = "/img/200407102.gif";
var featuresHeader = "<B>Features:</B><BR>"
var sSinQut ="'";
var sRandomBarsOrientationText="";
function copy2Clipboard()
{
// Copy displayed code to user's clipboard.
var textRange = document.body.createTextRange();
textRange.moveToElementText(oCodeSpan);
textRange.execCommand("Copy");
}
function highlightText(whatToHighlight) {
var oRng = document.body.createTextRange();
oRng.moveToElementText(oCodePre);
oRng.execCommand("RemoveFormat");
var oHL = document.body.createTextRange();
oHL.moveToElementText(oCodePre);
oHL.findText(whatToHighlight);
oHL.execCommand("Bold");
}
function switchContent(obj) {
oContentHolder.innerHTML=obj.innerHTML;
oImg.src=startImage;
if (obj==filterSection){
changeFilter();
updateFilterCode();
}
else {
imgObjText.innerHTML = "<BR><b>First Page</b><BR><BR>Using the <B>apply</B> method prepares this SPAN element for content changes.";
changeTrans();
updateTransCode();
}
}
function getControlObject(controlName) {
var obj=null;
for (x=0; x < document.all(controlName).length; x++) {
objTemp = document.all(controlName,x);
if (objTemp.parentElement.isSource==null) {
obj=objTemp;
}
}
return(obj);
}
function disableControlObject(controlName) {
for (x=0; x < document.all(controlName).length; x++) {
document.all(controlName,x).disabled=true;
}
}
function enableControlObject(controlName) {
for (x=0; x < document.all(controlName).length; x++) {
document.all(controlName,x).disabled=false;
}
}
function changeFilter() {
var selectObject = getControlObject("oSelect");
var selectedValue = selectObject.options[selectObject.selectedIndex].value;
var transitionAsFilter = selectObject.options[selectObject.selectedIndex].TRANS;
imgObjText.innerHTML = "<BR>The image, dark red text, and sky blue background make up the content of the filtered SPAN.";
imgObj.style.backgroundColor='skyblue';
imgObj.style.color='darkred';
if (selectedValue != "empty") {
if (selectedValue.indexOf('AlphaImageLoader')!=-1) {
oControlsSpan.innerHTML = oAlphaImageLoaderControls.innerHTML;
alphaImageLoaderFilterChange();
}
else if (selectedValue.indexOf('Blur')!=-1) {
imgObj.style.backgroundColor='';
imgObjText.innerHTML = "<BR>The image, dark red text, and sky blue background make up the content of the filtered SPAN.";
oControlsSpan.innerHTML = oBlurControls.innerHTML;
blurFilterChange();
}
else if (selectedValue.indexOf('Alpha')!=-1) {
oControlsSpan.innerHTML = oAlphaControls.innerHTML;
alphaFilterChange();
}
else if (selectedValue.indexOf('Emboss')!=-1) {
oControlsSpan.innerHTML = "";
embossFilterChange();
}
else if (selectedValue.indexOf('Engrave')!=-1) {
oControlsSpan.innerHTML = "";
engraveFilterChange();
}
else if (selectedValue.indexOf('Pixelate')!=-1) {
oControlsSpan.innerHTML = oPixelateFilterControls.innerHTML;
pixelateFilterChange();
}
else if (selectedValue.indexOf('DropShadow')!=-1) {
imgObj.style.backgroundColor='';
imgObjText.innerHTML = "<BR>The image, dark red text, and sky blue background make up the content of the filtered SPAN.";
oControlsSpan.innerHTML = oDropShadowControls.innerHTML;
dropShadowFilterChange();
}
else if (selectedValue.indexOf('Chroma')!=-1) {
oControlsSpan.innerHTML = oChromaControls.innerHTML;
chromaFilterChange();
}
else if (selectedValue.indexOf('BasicImage')!=-1) {
oControlsSpan.innerHTML = oBasicImageControls.innerHTML;
basicImageFilterChange();
}
else {
imgObj.style.filter=selectedValue;
oControlsSpan.innerHTML = '';
}
if (oControlsSpan.innerHTML!='') {
oControlsSpan.innerHTML = featuresHeader + oControlsSpan.innerHTML;
}
if (transitionAsFilter == "TRUE") {
oControlsSpan.innerHTML = oControlsSpan.innerHTML + oGlobalControls.innerHTML;
progressChange();
}
}
else {
imgObj.style.filter='';
oControlsSpan.innerHTML = featuresHeader + 'No filter is currently selected.';
}
updateFilterCode();
}
function updateFilterCode() {
oCodePre.innerText=imgObj.outerHTML;
}
function alphaFilterChange(){
var cmd;
var controlObject = getControlObject("styleList");
var style = controlObject.options[controlObject.selectedIndex].value;
controlObject = getControlObject("opacityList");
var opacity = controlObject.options[controlObject.selectedIndex].value;
cmd = "imgObj.style.filter='progid:DXImageTransform.Microsoft.Alpha( " ;
cmd = cmd + "style=" + style + ",opacity=" + opacity ;
if (style!=0){
controlObject = getControlObject("finishOpacityList");
enableControlObject("finishOpacityList");
var finishOpacity = controlObject.options[controlObject.selectedIndex].value;
cmd = cmd + ",finishOpacity=" + finishOpacity ;
if (style==1){
controlObject = getControlObject("startXList");
enableControlObject("startXList");
var startX = controlObject.options[controlObject.selectedIndex].value;
controlObject = getControlObject("finishXList");
enableControlObject("finishXList");
var finishX = controlObject.options[controlObject.selectedIndex].value;
controlObject = getControlObject("startYList");
enableControlObject("startYList");
var startY = controlObject.options[controlObject.selectedIndex].value;
controlObject = getControlObject("finishYList");
enableControlObject("finishYList");
var finishY = controlObject.options[controlObject.selectedIndex].value;
cmd = cmd + ",startX=" + startX + ",finishX=" + finishX ;
cmd = cmd + ",startY=" + startY + ",finishY=" + finishY;
}
else{
disableControlObject("startXList");
disableControlObject("finishXList");
disableControlObject("startYList");
disableControlObject("finishYList");
}
}
else{
disableControlObject("finishOpacityList");
disableControlObject("startXList");
disableControlObject("finishXList");
disableControlObject("startYList");
disableControlObject("finishYList");
}
cmd = cmd + ")'";
eval(cmd);
updateFilterCode();
highlightText(cmd);
}
function alphaImageLoaderFilterChange(){
var cmd;
var controlObject = getControlObject("srcList");
var src = controlObject.options[controlObject.selectedIndex].value;
controlObject = getControlObject("sizingMethodList");
var sizingmethod = controlObject.options[controlObject.selectedIndex].value;
cmd = "imgObj.style.filter='progid:DXImageTransform.Microsoft.AlphaImageLoader( " ;
cmd = cmd + "src=" + src + ", sizingmethod=" + sizingmethod + ")'";
eval(cmd);
updateFilterCode();
highlightText(cmd);
}
function basicImageFilterChange(){
var cmd;
var controlObject = getControlObject("rotationList");
var rotation = controlObject.options[controlObject.selectedIndex].value;
controlObject = getControlObject("mirrorSwitch");
controlObject.checked==true ? mirror = 1 : mirror = 0
controlObject = getControlObject("invertSwitch");
controlObject.checked==true ? invert = 1 : invert = 0
controlObject = getControlObject("xraySwitch");
controlObject.checked==true ? xray = 1 : xray = 0
control