getobj("obj.style 和 getobj("obj").style ?

解决方案 »

  1.   

    直接写就行了啊
    getobj("obj\.style
    .需要转义 没别的了啊
      

  2.   

    //????
    var reg=/getobj\("obj.style/gialert(reg.test('getobj("obj.style'))alert(reg.test('getobj("obj").style'))
      

  3.   

    var reg=/getobj\("obj\.style/gialert(reg.test('getobj("obj.style'))alert(reg.test('getobj("obj").style'))
      

  4.   

    問題是obj是變量來的
    比如
    getobj("obj.style 
    getobj("abc.style 
    但不符合 
    getobj("obj").style 
    getobj("abc").style ()里面 的是變量來的
      

  5.   

    var reg='getobj\(\"'+obj+'.style'
    var re=/reg/gi
    随便写的,自己测试下
    大概就是这么一个意思