js.js
上传用户:yphy1126
上传日期:2021-09-08
资源大小:2129k
文件大小:2k
源码类别:

FlashMX/Flex源码

开发平台:

HTML/CSS

  1. var httpis=false
  2. function window.onload(){
  3. if(location.protocol=="http:")httpis=true;else httpis=false
  4. bk1.fill.type='gradient';bk1.fill.color='white';bk1.fill.angle=50;
  5. bk1.fill.method='any';bk1.fill.colors.value='50% #f1f0c7';
  6. var temp1=location.href;
  7. temp1=temp1.substr(temp1.lastIndexOf('/')+1).replace('.htm','');
  8. for(i=0;i<parent.document.all.tags('LI').length;i++){
  9. var tempobj=parent.document.all.tags('LI')[i];
  10. if(tempobj.s==temp1){
  11. menudiv1.innerHTML='《VML极道教程》<font style=font-size:12px;font-family:宋体>原著:沐缘华</font><br><font color=black>'+tempobj.s.replace('_','章')+'节:'+tempobj.innerText+'</font>';tempobj.style.color='red'
  12. };else if(tempobj.style.color!='navy')tempobj.style.color='navy';}
  13. var textlen=document.all.tags("textarea").length
  14. var nextis=-1
  15. for(i=0;i<textlen;i++){
  16. nextis++
  17. var temp1=document.all.tags("textarea")[i]
  18. if(temp1.no==null)var tempcolor1="blue";else var tempcolor1="navy"
  19. var temp1html="<div design=true id=code"+nextis+" style='cursor:text;letter-Spacing:0.9;color:"+tempcolor1+"'>"+temp1.value.replace(/</g,'&lt;').replace(/r/g,'<BR>').replace(/<BR>n<BR>/g,'<br>&nbsp;<br>').replace(/ //(.*?)n/g,'<font color=green>//$1</font>n')+"</div>"
  20. if(temp1.no==null)temp1html+="<center><input type=button value=快速运行以上VML代码在浏览器看效果 style='width:240;cursor:hand' onclick=openvmlwin(code"+nextis+")><input type=button value=临时编辑以上代码 style='width:120;cursor:hand' onclick=code"+nextis+".contentEditable=true></center>"
  21. temp1.outerHTML=temp1html
  22. i--;textlen--
  23. }
  24. }
  25. function openvmlwin(whatobj){
  26. var win1=window.open("","win1");win1.document.open();win1.document.write(whatobj.innerText);win1.document.close()
  27. win1.moveTo(0,0);win1.resizeTo(screen.availWidth,screen.availHeight);win1.focus()
  28. }
  29. function document.onkeypress(){ 
  30. if(event.keyCode==13&&event.srcElement.tagName=="DIV"){
  31. var txtobj=document.selection.createRange()
  32. txtobj.text==""?txtobj.text="n":(document.selection.clear())&(txtobj.text="n")
  33. document.selection.createRange().select()
  34. return false
  35. }}