2011-10-05 3 views
1

내 페이지에 ASP 양식이 있습니다. 양식 요소는 product.css 이라는 CSS 파일로 스타일이 지정됩니다.이 양식에는 3 개의 선택 상자가 있습니다. 페이지를로드 할 때 CSS는 잘로드되고 모든 것이 올바르게 표시됩니다. 선택 상자에서 값을 선택하자마자 콜백은 product.css 파일이 IE에서 찾을 수없는 지점으로 연결됩니다. 이것은 IE 7/8에서만 발생합니다. IE9를 포함한 모든 브라우저가 정상적으로 작동하고 있습니다.IE 8에서 선택 변경시 CSS 파일을 찾을 수 없습니다.

무엇이 문제 일 수 있습니까?

+1

우리는 몇 가지 코드를 참조해야 할 것입니다. 콜백은 무엇을합니까? – Alohci

+0

코드를 붙여서이 호에서보고 도와 드리겠습니다. –

답변

0

여기서 ASP의 인코더 디코더. 희망이 당신을 도웁니다

Function Base64Encode(inData) 
'rfc1521 
'2001 Antonin Foller, Motobit Software, http://Motobit.cz 

Const Base64 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz/" 
Dim cOut, sOut, I 

'For each group of 3 bytes 

For I = 1 To Len(inData) Step 3 
Dim nGroup, pOut, sGroup 

'Create one long from this 3 bytes. 

nGroup = &H10000 * Asc(Mid(inData, I, 1)) + _ 
&H100 * MyASC(Mid(inData, I + 1, 1)) + MyASC(Mid(inData, I + 2, 1)) 

'Oct splits the long To 8 groups with 3 bits 

nGroup = Oct(nGroup) 

'Add leading zeros 

nGroup = String(8 - Len(nGroup), "0") & nGroup 

'Convert To base64 

pOut = Mid(Base64, CLng("&o" & Mid(nGroup, 1, 2)) + 1, 1) + _ 
Mid(Base64, CLng("&o" & Mid(nGroup, 3, 2)) + 1, 1) + _ 
Mid(Base64, CLng("&o" & Mid(nGroup, 5, 2)) + 1, 1) + _ 
Mid(Base64, CLng("&o" & Mid(nGroup, 7, 2)) + 1, 1) 

'Add the part To OutPut string 

sOut = sOut + pOut 

'Add a new line For Each 76 chars In dest (76*3/4 = 57) 
'If (I + 2) Mod 57 = 0 Then sOut = sOut + vbCrLf 

Next 
Select Case Len(inData) Mod 3 
Case 1: '8 bit final 

sOut = Left(sOut, Len(sOut) - 2) + "==" 
Case 2: '16 bit final 

sOut = Left(sOut, Len(sOut) - 1) + "=" 
End Select 
Base64Encode = sOut 
End Function 

Function MyASC(OneChar) 
If OneChar = "" Then MyASC = 0 Else MyASC = Asc(OneChar) 
End Function 



Function Base64Decode(ByVal base64String) 
'rfc1521 
'1999 Antonin Foller, Motobit Software, http://Motobit.cz 

Const Base64 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz/" 
Dim dataLength, sOut, groupBegin 

'remove white spaces, If any 

base64String = Replace(base64String, vbCrLf, "") 
base64String = Replace(base64String, vbTab, "") 
base64String = Replace(base64String, " ", "") 

'The source must consists from groups with Len of 4 chars 

dataLength = Len(base64String) 
If dataLength Mod 4 <> 0 Then 
Err.Raise 1, "Base64Decode", "Bad Base64 string." 
Exit Function 
End If 


' Now decode each group: 

For groupBegin = 1 To dataLength Step 4 
Dim numDataBytes, CharCounter, thisChar, thisData, nGroup, pOut 
' Each data group encodes up To 3 actual bytes. 

numDataBytes = 3 
nGroup = 0 

For CharCounter = 0 To 3 
' Convert each character into 6 bits of data, And add it To 
' an integer For temporary storage. If a character is a '=', there 
' is one fewer data byte. (There can only be a maximum of 2 '=' In 
' the whole string.) 

thisChar = Mid(base64String, groupBegin + CharCounter, 1) 

If thisChar = "=" Then 
numDataBytes = numDataBytes - 1 
thisData = 0 
Else 
thisData = InStr(1, Base64, thisChar, vbBinaryCompare) - 1 
End If 
If thisData = -1 Then 
Err.Raise 2, "Base64Decode", "Bad character In Base64 string." 
Exit Function 
End If 

nGroup = 64 * nGroup + thisData 
Next 

'Hex splits the long To 6 groups with 4 bits 

nGroup = Hex(nGroup) 

'Add leading zeros 

nGroup = String(6 - Len(nGroup), "0") & nGroup 

'Convert the 3 byte hex integer (6 chars) To 3 characters 

pOut = Chr(CByte("&H" & Mid(nGroup, 1, 2))) + _ 
Chr(CByte("&H" & Mid(nGroup, 3, 2))) + _ 
Chr(CByte("&H" & Mid(nGroup, 5, 2))) 

'add numDataBytes characters To out string 

sOut = sOut & Left(pOut, numDataBytes) 
Next 

Base64Decode = sOut 
End Function 
관련 문제