本人想通过Prototype.js学习javascript 今天一看代码就傻了 
请帮忙写一下注释var Prototype = {
  Version: '1.5.1',  Browser: {
    IE:     !!(window.attachEvent && !window.opera),
    Opera:  !!window.opera,
    WebKit: navigator.userAgent.indexOf('AppleWebKit/') > -1,
    Gecko:  navigator.userAgent.indexOf('Gecko') > -1 &&
navigator.userAgent.indexOf('KHTML') == -1
  },  BrowserFeatures: {
    XPath: !!document.evaluate,
    ElementExtensions: !!window.HTMLElement,
    SpecificElementExtensions:
      (document.createElement('div').__proto__ !==
       document.createElement('form').__proto__)
  },  ScriptFragment: '<script[^>]*>([\u0001-\uFFFF]*?)</script>',
  JSONFilter: /^\/\*-secure-\s*(.*)\s*\*\/\s*$/,  emptyFunction: function() { },
  K: function(x) { return x }
}

解决方案 »

  1.   

    问题1
    '<script[^>]*>([\u0001-\uFFFF]*?)</script>'
    是什么意思?
      

  2.   

    正则表达式PS:很不欣赏 prototype.js 的代码风格,剑走偏锋!
      

  3.   

    你好象写错了吧?我的怎么是下面这句
    ---------------------------------------------
    ScriptFragment: '(?:<script.*?>)((\n|\r|.)*?)(?:<\/script>)'
      

  4.   

    TO:meizz(梅花雪) 
    谢谢刚才的帮忙^_^prototype写的还是很有水平的,基础类库都比较有特点
      

  5.   

    问题1
    '<script[^>]*>([\u0001-\uFFFF]*?)</script>'
    是什么意思?
    ========>
    这就是匹配<script...>.....</script>
    脚本的代码段
      

  6.   

    Prototype作为基础库扩展还不错,一般不直接用
    你可以看看jquery,那个代码也很好