您的位置:

java特效代码,js代码特效

本文目录一览:

求java公告栏特效代码

import javax.swing.JFrame;

import javax.swing.JLabel;

import javax.swing.JPanel;

public class Test{

private JFrame frame;

private String scrolledText;

private String str ="滚动文字 Demo";

public static void main(String args[]) {

try{

Test window = new Test();

window.frame.setVisible(true);

}

catch(Exception e){

e.printStackTrace();

}

}

public Test(){

initialize();

}

private void initialize(){

frame.setBounds(100, 100, 500, 375);

frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

final JPanel panel = new JPanel();

panel.setBackground(Color.WHITE);

panel.setLayout(new BorderLayout());

frame.getContentPane().add(panel, BorderLayout.NORTH);

final JLabel label = new JLabel();

label.setText("New JLabel");

panel.add(label);

label_scrolledText(label);

frame.addComponentListener(

new ComponentAdapter(){

public void componentResized(ComponentEvent arg0){

label_scrolledText(label);

}

});

}

public void label_scrolledText(JLabel label) {

this.scrolledText = this.str;

label.setText(scrolledText);

FontMetrics metrics = label.getFontMetrics(label.getFont());

int textW = metrics.stringWidth(label.getText());

Dimension frameSize = frame.getSize();

for (int i = 1; i = (frameSize.width - textW) / 3 - 3; i++)

scrolledText += " ";

label.setText(scrolledText);

Thread thread = new Thread(new TextChanger(label));

thread.start();

}

}

java.lang.NullPointerException

at Test.initialize(Test.java:26)

at Test.init(Test.java:23)

at Test.main(Test.java:16)

为什么HTML中JAVA特效没网就打不开,该怎样解决呢。下面是我的代码

""

你这个是链接互联网上的js文件,不能联网肯定找不到啊,最好用你项目里面的Jquery.js

页面特效:下星星的代码(JAVA代码)

以下的代码就可以,lz自己在*的地方填入星星的图片就可以了

body bgcolor=#ee3300

style

.drop { position: absolute; width: 3; filter: flipV(), flipH(); font-size: 40; color: #ffffff }

/style

script language="javascript"

snow = false; // false-rain; true-snow

snowsym = " * " are the symbols for each

rainsym = " * " can put images here.

howmany = 20 many drops/snowflakes?

/**************Do not need to change anything below***********/

if(snow){sym = snowsym; speed=1; angle=10; drops=howmany}

else{sym = rainsym; speed=30; drops=howmany; angle=6}

movex = -speed/angle; movey = speed; count = 0;

function moverain(){

for(move = 0; move drops; move++){

xx[move]+=movex; yy[move]+=mv[move];

hmm = Math.round(Math.random()*1);

if(xx[move] 0){xx[move] = maxx+10;}

if(yy[move] maxy){yy[move] = 10;}

drop[move].left = xx[move]

drop[move].top = yy[move]+document.body.scrollTop;

}setTimeout('moverain()','1')}

/script

script language="javascript"

if (document.all){

drop = new Array(); xx = new Array(); yy = new Array(); mv = new Array()

ly = "document.all[\'"; st = "\'].style"

for(make = 0; make drops; make++){

document.write('div id="drop'+make+'" class=drop'+sym+'/div');

drop[make] = eval(ly+'drop'+make+st);

maxx = document.body.clientWidth-40

maxy = document.body.clientHeight-40

xx[make] = Math.random()*maxx;

yy[make] = -100-Math.random()*maxy;

drop[make].left = xx[make]

drop[make].top = yy[make]

mv[make] = (Math.random()*5)+speed/16;

drop[make].fontSize = (Math.random()*10)+20;

if(snow){col = 'white'}else{col = 'white'}

drop[make].color = col;

}

window.onload=moverain

}

/script

/body

急求一个网页特效代码

用这个吧 可以全屏拖动的 支持FLASH引用

script id=clientEventHandlersJS language=JScript

!--

function ad_check() {

self.onError=null;

self.onError=null;

setTimeout("ad_check()",100);

}

function Min_onclick() {

//alert(ad1.style.visibility )

ad1.style.visibility='hidden';

}

function Max_onclick() {

//alert(ad1.style.visibility )

ad1.style.visibility='visible';

}

//--

/scriptscript language=JScript

//floater.innerHTML =''

//window.alert (floater.innerHTML.length4000);

self.onError=null;

currentX = currentY = 0;

whichIt = null;

lastScrollX = 0; lastScrollY = 0;

NS = (document.layers) ? 1 : 0;

IE = (document.all) ? 1: 0;

!-- STALKER CODE --

function heartBeat() {

if(IE) { diffY = document.body.scrollTop; diffX = document.body.scrollLeft; }

if(NS) { diffY = self.pageYOffset; diffX = self.pageXOffset; }

if(diffY != lastScrollY) {

percent = .1 * (diffY - lastScrollY);

if(percent 0) percent = Math.ceil(percent);

else percent = Math.floor(percent);

if(IE) document.all.floater.style.pixelTop += percent;

if(NS) document.floater.top += percent;

lastScrollY = lastScrollY + percent;

}

if(diffX != lastScrollX) {

percent = .1 * (diffX - lastScrollX);

if(percent 0) percent = Math.ceil(percent);

else percent = Math.floor(percent);

if(IE) document.all.floater.style.pixelLeft += percent;

if(NS) document.floater.left += percent;

lastScrollX = lastScrollX + percent;

}

}

//--

function checkFocus(x,y) {

stalkerx = document.floater.pageX;

stalkery = document.floater.pageY;

stalkerwidth = document.floater.clip.width;

stalkerheight = document.floater.clip.height;

if( (x stalkerx x (stalkerx+stalkerwidth)) (y stalkery y

(stalkery+stalkerheight))) return true;

else return false;

}

function grabIt(e) {

if(IE) {

whichIt = event.srcElement;

while (whichIt.id.indexOf("floater") == -1) {

whichIt = whichIt.parentElement;

if (whichIt == null) { return true; }

}

whichIt.style.pixelLeft = whichIt.offsetLeft;

whichIt.style.pixelTop = whichIt.offsetTop;

currentX = (event.clientX + document.body.scrollLeft);

currentY = (event.clientY + document.body.scrollTop);

} else {

window.captureEvents(Event.MOUSEMOVE);

if(checkFocus (e.pageX,e.pageY)) {

whichIt = document.floater;

stalkerTouchedX = e.pageX-document.floater.pageX;

StalkerTouchedY = e.pageY-document.floater.pageY;

}

}

return true;

}

function moveIt(e) {

if (whichIt == null) { return false; }

if(IE) {

newX = (event.clientX + document.body.scrollLeft);

newY = (event.clientY + document.body.scrollTop);

distanceX = (newX - currentX); distanceY = (newY - currentY);

currentX = newX; currentY = newY;

whichIt.style.pixelLeft += distanceX;

whichIt.style.pixelTop += distanceY;

if(whichIt.style.pixelTop document.body.scrollTop) whichIt.style.pixelTop =

document.body.scrollTop; if(whichIt.style.pixelLeft document.body.scrollLeft)

whichIt.style.pixelLeft = document.body.scrollLeft; if(whichIt.style.pixelLeft

document.body.offsetWidth - document.body.scrollLeft - whichIt.style.pixelWidth - 20)

whichIt.style.pixelLeft = document.body.offsetWidth - whichIt.style.pixelWidth - 20;

if(whichIt.style.pixelTop document.body.offsetHeight + document.body.scrollTop -

whichIt.style.pixelHeight - 5) whichIt.style.pixelTop = document.body.offsetHeight +

document.body.scrollTop - whichIt.style.pixelHeight - 5;

event.returnValue = false;

} else {

whichIt.moveTo(e.pageX-StalkerTouchedX,e.pageY-StalkerTouchedY);

if(whichIt.left 0+self.pageXOffset) whichIt.left = 0+self.pageXOffset;

if(whichIt.top 0+self.pageYOffset) whichIt.top = 0+self.pageYOffset;

if( (whichIt.left + whichIt.clip.width) = (window.innerWidth+self.pageXOffset-17)) whichIt.left

= ((window.innerWidth+self.pageXOffset)-whichIt.clip.width)-17;

if( (whichIt.top + whichIt.clip.height) = (window.innerHeight+self.pageYOffset-17)) whichIt.top

= ((window.innerHeight+self.pageYOffset)-whichIt.clip.height)-17;

return false;}

return false;

}

function dropIt() {

whichIt = null;

if(NS) window.releaseEvents (Event.MOUSEMOVE);

return true;

}

!-- DRAG DROP CODE --

if(NS) {

window.captureEvents(Event.MOUSEUP|Event.MOUSEDOWN);

window.onmousedown = grabIt;

window.onmousemove = moveIt;

window.onmouseup = dropIt;

}

if(IE) {

document.onmousedown = grabIt;

document.onmousemove = moveIt;

document.onmouseup = dropIt;

}

if(NS || IE) action = window.setInterval("heartBeat()",1);

setTimeout("ad_check()",10)

/script

/div

DIV align=center id=floater style="HEIGHT: 100px; WIDTH: 343px; position:absolute; left:76px; top:126px"

TABLE bgColor=#eeeeee border=1 borderColor=#999999

cellPadding=0 cellSpacing=0

style="BORDER-COLLAPSE: collapse" width=167

TBODY

TR

TD height=20 width=167

TABLE border=0 cellPadding=0 cellSpacing=0

width="100%"

TBODY

TR

TD align=right

height=15 vAlign=bottom width="100%"

TABLE border=0 height=2 width="100%"

TR

TD height=1 align=rightFONT color=#000000 face=宋体

style="FONT-SIZE: 9pt" /FONT font

class=banner

id=Min language=javascript

onclick="return Min_onclick()"font color="#990000" style="font-size: 9pt; cursor: hand"收起/font/fontfont

class=banner

id=Min language=javascript

onclick="return Max_onclick()"FONT

color=#666666//FONTfont color="#990000" style="font-size: 9pt; cursor: hand"展开/font/font/TD

/TR/TABLE/TD/TR/TBODY/TABLE/TD/TR/TBODY/TABLE

TABLE bgColor=#eeeeee border=1 borderColor=#999999

cellPadding=2 cellSpacing=0 id=ad1

style="BORDER-COLLAPSE: collapse" width=165

TBODY

TR

TD bgColor=#eeeeee disabled height=20 width=165 P align=center

object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="" width="165" height="120"

param name="movie" value=""

param name="quality" value="high"

embed src="" quality="high" pluginspage="" type="application/x-shockwave-flash" width="165" height="120"/embed/object

/P

/TD/TR

TR

TD bgColor=#eeeeee height=20 width=310div align="left"

FONT

color=#990000 size=2font color="#666666"/font/FONT

FONT

color=#FFFFFF size=2 /FONTFONT

color=#800000 size=2蓝染惣右介/FONT/div/TD

/TR

/TBODY/TABLE

/DIV

java特效代码怎么在dreamweaver中用的

在html代码中可随变放,不过我们一般放在head/head之间

script language="javascript"

特效代码放此.....

/script

java特效代码,js代码特效

2022-11-28
java特效,java特效代码

2022-11-23
js特效代码,js特效代码显示时钟

本文目录一览: 1、什么是JS特效 2、前端开发中常用到的js特效有哪些 3、JS特效代码,让网页打开时候最小化,6秒后最大化。追加100分 4、当单击按钮时 显示搜索框,当再次单击按钮时隐藏搜索框,

2023-12-08
web代码较少的js特效(网页js特效)

本文目录一览: 1、jq特效和js特效区别 2、JS特效代码,让网页打开时候最小化,6秒后最大化。追加100分 3、前端开发中常用到的js特效有哪些 4、网页特效代码 5、什么是JS特效 jq特效和j

2023-12-08
网页桌面js特效代码,网页javascript特效

本文目录一览: 1、JS特效代码,让网页打开时候最小化,6秒后最大化。追加100分 2、前端开发中常用到的js特效有哪些 3、浏览器怎么设置启用显示javascript代码JS效果 4、什么是JS特效

2023-12-08
雨滴特效js源代码下载(雨滴特效软件)

本文目录一览: 1、求OK.Its.Raining.Men(屏幕雨滴特效工具) V1.51 多国语言绿色版网盘资源 2、FLASH动画模块 3、如何用html或者js制作天降很多的滑稽还有代码雨的特效

2023-12-08
js代码特效资源,js特效素材网

2022-11-23
经典效果js源码,源代码特效

本文目录一览: 1、问下在哪有js特效的源码那些,怎么弄? 2、看有些网站的jquery和js的效果比较好,如何能看到这些js的源码的?谢谢指教 3、用js源码做出缓动效果,关于for循环和setti

2023-12-08
js简单效果代码(js案例特效大全)

本文目录一览: 1、简单的js代码编程 2、JS效果代码 3、js网页打字机效果代码? 4、急!急!急!求一段简单的JS代码 5、关于Javascript 特效代码 6、求一个简单的点击图片放大缩小的

2023-12-08
js模拟钢琴演奏代码特效,js实现钢琴

本文目录一览: 1、最近在抖音上经常刷到一段视频,钢琴能自动弹奏,是什么情况? 2、有什么弹钢琴软件,琴键上有提示,可以指导你弹 3、auto.js完美钢琴脚本,怎样把我收藏的歌,在远程连线里播放?

2023-12-08
表白代码js特效,用代码表白

本文目录一览: 1、简单的代码表白 2、程序员的表白代码 3、表白代码大全可复制免费 4、抖音上的表白代码是什么 抖音表白代码怎么写 简单的代码表白 1、浏览器标签法这个先用不到代码,但却十分简单实用

2023-12-08
js软件代码(js软件开发)

本文目录一览: 1、如何编写高效的js代码 2、什么是JS代码? 3、js代码是什么 4、JS代码是什么 5、如何执行javascript代码 6、JS代码是什么意思? 如何编写高效的js代码 今天,

2023-12-08
js特效记录上次登录时间代码,js特效记录上次登录时间代码怎

本文目录一览: 1、用户第一次进入网站,如何用JS来保存进入的时间? 2、js如何获取cookie第一次登录时间 3、如何用JS代码来写出每次系统登陆的时候,平台日志就会记录你的所有操作和登陆时间?

2023-12-08
网站鼠标特效js代码(网站鼠标点击特效)

本文目录一览: 1、请教网页设计高手鼠标特效代码代码求大神帮助 2、求 js 特效,鼠标滑过,显示浮层 3、在html中怎么用js实现鼠标指向图片时图片放大的效果?(具体实现) 请教网页设计高手鼠标特

2023-12-08
最好是java特效(java特效是什么)

2022-11-15
js制造网页特效(精美网页js特效)

本文目录一览: 1、没有基础,要用JAVASCRIPT做出网页幻灯片特效,一般要学多长时间啊?我指的是自己把JS弄懂来用,而不是把别... 2、js网页特效的代码怎么使用 3、如何在joomla网页的

2023-12-08
js效果源码集合下载(js特效代码下载)

本文目录一览: 1、求js读取数据库数据显示在页面上的表中的功能源码 2、怎么把一个网页的js代码下载 下来啊 3、如何使用js实现页面下载功能 4、如何下载js文件 5、怎么样下载js 6、下载的j

2023-12-08
css特效js实例(css3网页特效)

本文目录一览: 1、如何用JS和CSS3制作炫酷的弹窗效果 2、导航条js+css特效代码怎么用 3、怎样用js触发css的过渡效果 4、如何用css,js实现如图效果 5、js+css实现文字散开重

2023-12-08
js好看效果源代码大全下载,js特效素材网

本文目录一览: 1、关于Javascript 特效代码 2、求js代码,效果是“点击图片缓慢消失,然后进入网站” 3、网页制作:谁给我发个js实现图片横向滚动的源代码? 4、请问怎么下载网页中的js,

2023-12-08
js图片转动代码(图片切换js特效代码)

本文目录一览: 1、javascript让图片移动的函数 2、JS控制图片向左向右移动的代码 3、js实现图片旋转效果 4、js 怎么实现点击一次图片旋转90度,再点击再转90度呢 5、JavaScr

2023-12-08