javascript:R=0; x1=.1; y1=.05; x2=.25; y2=.24; x3=1.6; y3=.24; x4=300; y4=200; x5=300; y5=200; DI=document.images; DIL=DI.length; function A(){for(i=0; i-DIL; i++){DIS=DI[ i ].style; DIS.position='absolute'; DIS.left=Math.sin(R*x1+i*x2+x3)*x4+x5; DIS.top=Math.cos(R*y1+i*y2+y3)*y4+y5}R++}setInterval('A()',5); void(0);

Feedback

DIS.position='absolute'，在Flyings翻译的文章中有提到，通过设置属性position为absolute，可以进行拖动

setInterval('A()',5)；

void(0)

hehe, js我也是门外汉，转来的
void(0)应该是告诉浏览器什么都不做,如果不加的话浏览器会把地址栏中的内容当成链接打开,这样代码虽然执行了,但是这个窗口中的内容也没有了,得不到image对象了就没的玩了,不知道这样理解对不对

 只有注册用户登录后才能发表评论。 网站导航: 相关文章:

posts - 43, comments - 200, trackbacks - 0, articles - 2
{"ft_lang_label":"__label__zh","ft_lang_prob":0.9364489,"math_prob":0.97495794,"size":373,"snap":"2019-43-2019-47","text_gpt3_token_len":282,"char_repetition_ratio":0.09756097,"word_repetition_ratio":0.0952381,"special_character_ratio":0.27345845,"punctuation_ratio":0.19354838,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.9966276,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2019-10-16T07:58:18Z\",\"WARC-Record-ID\":\"<urn:uuid:180f4c3f-d705-45c1-8856-c8704ca13eec>\",\"Content-Length\":\"33803\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:69436c31-e2d6-47b9-b2ba-61d325e8a7a5>\",\"WARC-Concurrent-To\":\"<urn:uuid:3507aca3-379a-4cc2-8e25-c63a8f87dc71>\",\"WARC-IP-Address\":\"116.62.134.65\",\"WARC-Target-URI\":\"http://www.blogjava.net/hallywang/archive/2006/10/18/75718.html\",\"WARC-Payload-Digest\":\"sha1:YQRW5OODES6ZVW4XDRE4DYZ4XOZMKZPG\",\"WARC-Block-Digest\":\"sha1:56DHT24KAZEWUSSGMYGKDOZSGFMGA22O\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2019/CC-MAIN-2019-43/CC-MAIN-2019-43_segments_1570986666467.20_warc_CC-MAIN-20191016063833-20191016091333-00351.warc.gz\"}"}