笨笨網站超級論壇 (綠色版本)


頁: [1]

#1  設定圖片顯示位置 -  (Administrator) 發表於 17-5-2012 10:24

<P><FONT color=#0000ff size=3>如不能顯示語法效果可貼去本站</FONT><A href="http://www.bunbun000.com/html/index.htm" target=_blank><FONT color=red size=3>語法測試板</FONT></A><FONT color=#0000ff size=3>試看</FONT></P>
<P> </P>
<P> </P>
<P><A href="http://bunbun000.com/home/index/BBS.gif"><FONT color=purple>http://bunbun000.com/home/index/BBS.gif</FONT></A><FONT color=purple>  &lt;&lt;&lt;圖片網址</FONT></P>
<P><FONT color=#800080></FONT> </P>
<P><A href="http://bunbun000.com/home/index/BBS.gif"><FONT color=purple>http://bunbun000.com/</FONT></A><FONT color=purple> &lt;&lt;&lt;圖片連結位置</FONT></P>
<P><FONT color=purple></FONT> </P>
<P><FONT color=purple> alt="笨笨網站"  &lt;&lt;&lt;指著圖片時顯示語句</FONT></P>
<P><FONT color=purple></FONT> </P>
<P><FONT color=purple>var dx=88,dy=31;  &lt;&lt;&lt;圖片實際大小</FONT></P>
<P><FONT color=purple></FONT> </P>
<P><FONT color=purple>var choose=4;  &lt;&lt;&lt;&lt; 4為圖片出現之位置</FONT></P>
<P><FONT color=purple></FONT> </P>
<P><FONT color=purple>1 顯示在右上角<BR>2 顯示在左上角<BR>3 顯示在左下角<BR>4 顯示在右下角</FONT><BR></P>
<P><FONT color=blue></FONT> </P>
<P><FONT color=blue></FONT> </P>
<P><FONT color=blue></FONT> </P>
<P><FONT color=blue></FONT> </P>
<P><FONT color=blue>&lt;div id="mark" style="POSITION: absolute; VISIBILITY: visible  ; Z-INDEX: 2000; top: -500px; left:0px;"&gt;<BR>&lt;A href="</FONT><A href="http://bunbun000.com/home/index/BBS.gif"><FONT color=blue>http://bunbun000.com/</FONT></A><FONT color=blue>" target="_blank"&gt;<BR>&lt;IMG img border="0" src="</FONT><A href="http://bunbun000.com/home/index/BBS.gif"><FONT color=blue>http://bunbun000.com/home/index/BBS.gif</FONT></A><FONT color=blue>" alt="笨笨網站"&gt;&lt;/A&gt;<BR>&lt;/div&gt;</FONT></P>
<P><BR><FONT color=blue>&lt;script language="javascript1.2"&gt;</FONT></P>
<P><FONT color=blue>var dx=88,dy=31;<BR>var choose=4;</FONT></P>
<P><FONT color=blue>var bWidth,bHeight,offsetX,offsetY;<BR>var layerRef="null",layerStyleRef="null",styleSwitch="null";</FONT></P>
<P><FONT color=blue>if (document.layers) {<BR> layerStyleRef="layer.";<BR> layerRef="document.layers";<BR> styleSwitch="";<BR> pxSwitch="";</FONT></P>
<P><FONT color=blue> bHeight=window.innerHeight;<BR> bWidth= window.innerWidth;<BR> offsetX= "window.pageXOffset";<BR> offsetY=" window.pageYOffset";<BR>}<BR>else{<BR> layerStyleRef="layer.style.";<BR> layerRef="document.all";<BR> styleSwitch=".style";</FONT></P>
<P><FONT color=blue> bHeight=document.body.clientHeight;<BR> bWidth= document.body.clientWidth;<BR> offsetX= "document.body.scrollLeft";<BR> offsetY= "document.body.scrollTop";<BR>}</FONT></P>
<P><FONT color=blue>function moveLayerto(layerName,top,left){<BR> eval(layerRef+'["'+layerName+'"]'+styleSwitch+'.top=top');<BR> eval(layerRef+'["'+layerName+'"]'+styleSwitch+'.left=left');<BR>}</FONT></P>
<P><FONT color=blue>function alwaysONup(){<BR> var newY;<BR> if(choose == 1) {<BR>  layer_y = 0;<BR>  layer_x = bWidth;<BR>  layer_x += -dx;<BR> }<BR> else if(choose == 2) {<BR>  layer_y = 0;<BR>  layer_x = 0;<BR> }<BR> else if(choose == 3) {<BR>  layer_y = bHeight;<BR>  layer_y += -dy;<BR>  layer_x = 0;<BR> }<BR> else if(choose == 4) {<BR>  layer_y = bHeight;<BR>  layer_y += -dy;<BR>  layer_x = bWidth;<BR>  layer_x += -dx;<BR> }<BR> else {<BR>  alert("所輸入不正確!"<BR> }<BR> eval('layer_y+='+offsetY);<BR> moveLayerto("mark",layer_y,layer_x);<BR> setInterval('alwaysONup()');<BR>}</FONT></P>
<P><FONT color=blue>window.onLoad=alwaysONup();</FONT></P>
<P><FONT color=blue>&lt;/script&gt;</FONT></P>

#2  複製上列語法 -  (Administrator) 發表於 25-5-2013 12:21

<form name="copy">
<textarea cols="40" name="txt" rows="4" style="BACKGROUND-COLOR:#ffffff; COLOR:#000000; FONT-SIZE:9pt">
<div id="mark" style="POSITION: absolute; VISIBILITY: visible  ; Z-INDEX: 2000; top: -500px; left:0px;">
<A href="http://bunbun000.com/" target="_blank">
<IMG img border="0" src="http://bunbun000.com/home/index/BBS.gif" alt="笨笨網站"></A>
</div>


<script language="javascript1.2">

var dx=88,dy=31;
var choose=4;

var bWidth,bHeight,offsetX,offsetY;
var layerRef="null",layerStyleRef="null",styleSwitch="null";

if (document.layers) {
layerStyleRef="layer.";
layerRef="document.layers";
styleSwitch="";
pxSwitch="";

bHeight=window.innerHeight;
bWidth= window.innerWidth;
offsetX= "window.pageXOffset";
offsetY=" window.pageYOffset";
}
else{
layerStyleRef="layer.style.";
layerRef="document.all";
styleSwitch=".style";

bHeight=document.body.clientHeight;
bWidth= document.body.clientWidth;
offsetX= "document.body.scrollLeft";
offsetY= "document.body.scrollTop";
}

function moveLayerto(layerName,top,left){
eval(layerRef+'["'+layerName+'"]'+styleSwitch+'.top=top');
eval(layerRef+'["'+layerName+'"]'+styleSwitch+'.left=left');
}

function alwaysONup(){
var newY;
if(choose == 1) {
  layer_y = 0;
  layer_x = bWidth;
  layer_x += -dx;
}
else if(choose == 2) {
  layer_y = 0;
  layer_x = 0;
}
else if(choose == 3) {
  layer_y = bHeight;
  layer_y += -dy;
  layer_x = 0;
}
else if(choose == 4) {
  layer_y = bHeight;
  layer_y += -dy;
  layer_x = bWidth;
  layer_x += -dx;
}
else {
  alert("所輸入不正確!"
}
eval('layer_y+='+offsetY);
moveLayerto("mark",layer_y,layer_x);
setInterval('alwaysONup()');
}

window.onLoad=alwaysONup();

</script>
</textarea><br>
<input onclick="javascript:this.form.txt.focus();this.form.txt.select();" type="button" value="全選">
</form>

<br>

<script type="text/javascript"><!--
google_ad_client = "ca-pub-4078143172638881";
/* 336X280 */
google_ad_slot = "3268225205";
google_ad_width = 336;
google_ad_height = 280;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
頁: [1]

Powered by Discuz Simply! 0.54 Released © wxyuan90