写javascript的工具问题,写一个广告

在一个JSP页面里写程序,动态读取数据库里的内容,在最后的JavaScript问题上卡住了,我想让所有的radio都被选择上,都可以成功提交到下一个页面,请大家帮忙!!!
[问题点数:120分]
在一个JSP页面里写程序,动态读取数据库里的内容,在最后的JavaScript问题上卡住了,我想让所有的radio都被选择上,都可以成功提交到下一个页面,请大家帮忙!!!
[问题点数:120分]
不显示删除回复
显示所有回复
显示星级回复
显示得分回复
只显示楼主
相关帖子推荐:
2008年2月 总版技术专家分月排行榜第一2008年1月 总版技术专家分月排行榜第一
2008年7月 总版技术专家分月排行榜第三2008年6月 总版技术专家分月排行榜第三
本帖子已过去太久远了,不再提供回复功能。请问一个javascript问题,为什么我这样写if else判断 里面的script却都执行了_百度知道
请问一个javascript问题,为什么我这样写if else判断 里面的script却都执行了
刚才已经弄
&\/script&
提问者采纳
没代码懒打字搭眼看俩问题先改改试试:1、if判断既判断能用=号啊=号赋值==才判断2、if判断UTF-8字符串啊外面没双引号改:if( mmcc == &UTF-8& )另外注意 &UTF-8&
html 页面 charset 匹配写试
还是不是 代码贴出来了
提问者评价
其他类似问题
javascript的相关知识
按默认排序
其他3条回答
if(A == B)
与 if(A = B) 两种写
还是不是 代码贴出来了
write之后改变了代码的结构,换成这样var script = &&;if(A==B){
script = &&&...&/&&;}else{
script = &...GBK...&;}document.write(script);
只是格式,没有问题
还是不是 代码贴出来了
是不是if判断的==问题?
还是不是 代码贴出来了
等待您来回答
下载知道APP
随时随地咨询
出门在外也不愁页面导航:
→ 正文内容 实现网页上的浮动广告
JavaScript实现网页上的浮动广告的简单方法
JavaScript实现网页上的浮动广告的简单方法,需要的朋友可以参考一下
漫游于网络之间,你会发觉,因特网不但是信息的海洋,也是广告的海洋。除了普通的Gif Banner、Flash外,浮动广告也是时下网上较为流行的广告形式之一。当你拖动浏览器的滚动条时,这种在页面上浮动的广告,可以跟随屏幕一起移动。尽管这种效果对于广告展示有相当的实用价值,但对浏览你网页的人来讲,这则是个既妨碍阅读,又影响阅读兴趣的东西,因此一定不能滥用。不过,如果你能善用的话,它就能发挥出极大的作用。
  要做出浮动式广告的效果并不困难,如果你有JS基础的可以自己写一个,如果连写都懒得写的话,到网上下载一个特效工具,按提示粘贴一下代码就OK。不过,想要真正了解它是怎样做出来的,则需要掌握一些JS知识了。这里向大家介绍一下简单的浮动广告做法。
  以下这段代码可放在&body&&/body&之间,其间我加入了一些注释(即“//”后的文字及“&!―”“--&”之间的文字)。 代码如下:   &SCRIPT FOR=window EVENT=onload LANGUAGE="JScript"&   initAd();//载入页面后,调用函数initAd()   &/SCRIPT&   &script language="JScript"&   &!--   function initAd() {   document.all.AdLayer.style.posTop = -200;//设置onLoad事件激发以后,广告层相对于固定后的y方向位置   document.all.AdLayer.style.visibility = visible//设置层为可见   MoveLayer(AdLayer);//调用函数MoveLayer()   }   function MoveLayer(layerName) {   var x = 600;//浮动广告层固定于浏览器的x方向位置   var y = 300;//浮动广告层固定于浏览器的y方向位置   var diff = (document.body.scrollTop + y - document.all.AdLayer.style.posTop)*.40;   var y = document.body.scrollTop + y -   eval("document.all." + layerName + ".style.posTop = y");   eval("document.all." + layerName + ".style.posLeft = x");//移动广告层   setTimeout("MoveLayer(AdLayer);", 20);//设置20毫秒后再调用函数MoveLayer()   }   //--&   &/script&   &!--下面为一个ID为AdLayer的层(如ID名不为AdLayer,上面MoveLayer()内的AdLayer也要作相应修改),包括一张带链接的图片--&   &div id=AdLayer style=position: width:61 height:59 z-index:20; visibility:; left: 600 top: 300px&    &a href="http://www.jb51.net"&&img src=../qqkk2000.gif border="0" height="60" width="60"&&/a&    &/div&  在这里,你可以设置x、y的值来设定所固定层的位置,改变setTimeout("MoveLayer(AdLayer);", 20)中20的值为你希望调用MoveLayer()的时间间隔。还有要注意的是,使用的图片最好为透明背景的gif图,以使图片的背景颜色不至于遮住后面的的内容。
  切记,要慎用浮动式广告,考虑使用特效的同时,千万要考虑到浏览者的感觉,不能滥用哦!
上一篇:下一篇:
最 近 更 新
热 点 排 行
12345678910I've long looked at JavaScript as a second-class citizen in the programming world. Early on, it was the source of numerous
it was a nice bit of glue to patch together HTML applications with a bit of styling, but nobody would use and so forth. Java, Ruby, Python, they were the languages for doing real work.
But my attitude toward JavaScript has changed completely in the past few years. JavaScript has &grown up.& I'm sure there are many JavaScript developers who would take issue with that judgement, and argue that JavaScript has been a capable, mature, and under-appreciated
language all along. They may be right, though you can write any program in any complete programming language, including awful things like BASIC. What makes a language useful is some combination of the language's expressiveness and the libraries and tools available.
JavaScript clearly passed the expressiveness barrier a long time ago, even if the ceremony required for creating objects is distasteful. But recently, we've seen some extremely important game-changers: jQuery, JSON, Node.js, and HTML5. JavaScript may have
been a perfectly adequate language in the past, but these changes (and a few others that I'll point out) have made JavaScript a language that is essential for every developer to know. If there's one language you need to learn in the next year, it's JavaScript.
The potential of Node.js
the potential to revolutionize web development. It is a framework for building high performance web applications: applications that can respond very quickly and efficiently to a high volume of incoming requests. Although Node is a low-level framework that
can build any kind of application, it's particularly useful for building web servers. Its asynchronous event-driven paradigm is arguably more effective for web applications than the more familiar request-response paradigm.
Two things make Node particularly valuable, though. First, Google has started a revolution in JavaScript performance. This isn't to say that at any given moment they have the best JavaScript engine available (though that's a fairly good bet). But what's certain
is that Google took JavaScript performance seriously when other players didn't, and in doing so drove Mozilla, Apple, Microsoft, Opera, and other vendors into a performance race. The result is that the JavaScript engines we have now are much, much faster than
they were a few years ago, and are capable of running a serious web application.
Second, Node has benefitted from an enormous pool of JavaScript developers. Whatever language they use for the back end &server,& few developers don't use JavaScript in the client. It may only be for bit it may be for sophisticated Ajaxian
it may even be to write full-fledged applications, such as Twitter or Gmail. But whatever the case, the number of JavaScript developers is huge. And authors like&&have been pushing the idea that JavaScript, despite many warts, can and should be treated like a serious programming language.
At this point, writing Node applications is relatively crude: it's a low-level library, about as close to the metal as you can get with JavaScript. It is not a full-fledged web framework, like Rails or Django. But that is certain to change. Lightweight frameworks
like&&are starting to appear, and I have no doubt that we'll see more full-featured
frameworks built on top of Node.
I've mentioned the appearance of sophisticated web applications that run almost entirely in the browser. Those are hardly
new —&?&? But writing the client side of an application in JavaScript and running it on the browser is
increasingly attractive. HTML5 takes this trend a step further.
HTML5 is about JavaScript
I've said many times that HTML5 isn't really about HTML; it's about JavaScript. What changes in HTML itself? There are a few new tags, which in and of themselves aren't that difficult to understand. The power of HTML5 lies in what these tags allow you to create
in JavaScript. A drawing canvas isn't very useful without the code that lies behind it and creates an animation, a game, or a visualization tool. As soon as browsers supporting Canvas appeared, we saw hundreds of implementations of&&as
developers started playing with the new features. Some were crude, some were surprisingly rich. That work is entirely in JavaScript.
HTML5, then, isn't really a major advance
in angle-bracket- it's about enabling JavaScript to do more powerful things. The&library
(which is still bleeding edge) allows real-time 3D graphics inside an HTML5 canvas. HTML5 geolocation allows you to write location-aware applications in the browser (a basic capability for mobile phones). Persistent storage and offline functionality have enabled
developers to write full-fledged applications, with the same functionality you'd expect on a desktop, that run in the browser. There have also been experimental libraries for adding&. These are all really features of JavaScript. HTML5 just provides a structure for giving them meaning.
Furthermore, there have been significant advances in browser libraries that don't require HTML5. JavaScript has long been the workhorse for implementing dynamic features in HTML. But there have always been two problems: browser incompatibilities, and the awkwardness
of working directly with the DOM. The&&library has elegantly solved both problems, and
is the basis for modern client-side browser development. But it's not just JQuery. The&&and&&libraries
allow you to create complex interactive visualizations that run directly in the browser — for the first time, making the browser an important tool for data exploration.
JavaScript and databases, compilers and languages
The use of JavaScript has also exploded in databases. Three of the leading databases in the NoSQL movement,&,&,
and&, are &document databases.& Rather than storing tables, they store documents. And
for all three databases, a &document& means a&document, not a Word or Excel file. (Riak
also supports XML documents and plain text.) While JSON has been widely adopted as a data exchange format (there are libraries for parsing JSON in almost all modern programming languages), it's important to realize that JSON is really just a format for serializing
JavaScript objects. So while you can use JSON with any language, it's a natural fit for JavaS and the fact that JSON has become a cross-language standard, rather than some Python, Ruby, or Java serialization format, says a lot about JavaScript's
readiness to take a role on a larger stage. But even more than that, all three of these databases have facilities for executing JavaScript as part of queries. In the coming years, I would not be the least surprised to see JavaScript and JSON embedded within
other kinds of applications.
We've only seen the beginning of JavaScript development. At this year's&, javascript-to-javascript
compilers were a big theme, and seen as a major trend for the future. Google has been the hotbed of compiled JavaScript.&&is
the first framework I'm aware of that used compiled JavaScript (compiled from Java). I have never taken GWT a framework that exists just to save Java developers from having to use JavaScript just doesn't seem worthwhile. However, GWT does some
amazing JavaScript optimization in the process.&&is a JavaScript-to-JavaScript
compiler that does the same kinds of optimization.&, which first
appeared a few weeks ago, was designed to allow experimentation with the language itself: it compiles JavaScript with experimental language features into JavaScript that can run on any modern platform.
Finally, we're starting to see some&, much as we're seeing JVM languages in the Java space. Some of the more interesting languages, such as&&and,
are similar to JavaScript in style, but focus on smoothing out JavaScript's rough edges. Do you find the JavaScript object model interesting, but awkward, and are you put off by the ritual you need to go through to create a working object from a prototype?
You may find Coffeescript a significant improvement. In addition to smoothing out the object model, Coffeescript adds features like list comprehensions, and does away with most of the curly braces. As in Python, indentation serves to delimit blocks.
Web servers, rich web client libraries, HTML5, databases, even JavaScript-based languages: I see JavaScript everywhere. If you have avoided JavaScript, this is the year to learn it. There's no excuse — and if you don't, you risk being left behind.
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场
访问:287407次
积分:2293
积分:2293
排名:第6655名
原创:49篇
评论:122条

我要回帖

更多关于 javascript写cookie 的文章

 

随机推荐