我发现form
在iframe
内定义iframe
时form
提交<form id="form_role">
<iframe id="iframe_role" name="iframe_role">
</iframe>
</form>
有趣的事情。
form_role
我将iframe_role
提交给document.getElementById("form_role").method = "post";
document.getElementById("form_role").action = "ABC.jsp";
document.getElementById("form_role").target = "iframe_role";
document.getElementById("form_role").submit();
:
ABC.jsp
在Chrome中,iframe
加载但没有iframe
;即我丢失了ABC.jsp
。
在IE&amp; Opera,iframe
加载<iframe id="iframe_role" name="iframe_role">
</iframe>
<form id="form_role">
</form>
。
这种情况下的标准是什么?谁是正确的规格:Chrome或IE / Opera?
如果我将iframe排除在外:
ABC.jsp
然后iframe
加载到Chrome,IE和Opera中的Imports Microsoft.SqlServer.TransactSql.ScriptDom
Module Module1
Sub Main()
Dim fragment As TSqlFragment
Dim parser As New TSql120Parser(True)
Dim reader As System.IO.StreamReader
Dim errors As IList(Of ParseError)
reader = IO.File.OpenText("script.sql")
fragment = parser.Parse(reader, errors)
Dim foundIn As Boolean = False
Dim foundView As Boolean = False
Dim viewName As String = ""
For Each tkn As TSqlParserToken In fragment.ScriptTokenStream
If tkn.TokenType = TSqlTokenType.View Then
foundView = True
End If
If tkn.TokenType = TSqlTokenType.In Then
foundIn = True
End If
'Once you see a View, take everything until you see an As
If foundView = True And tkn.TokenType = TSqlTokenType.As Then
Console.WriteLine(viewName.Trim)
viewName = ""
foundView = False
ElseIf foundView = True Then
viewName += tkn.Text
End If
'Once you see an IN, collect the ASCII elements until a right parentheses is encountered.
If tkn.TokenType = TSqlTokenType.AsciiStringLiteral And foundIn = True Then
Console.WriteLine(tkn.Text)
ElseIf tkn.TokenType = TSqlTokenType.RightParenthesis And foundIn = True Then
'end of the IN condition
foundIn = False
End If
Next
Console.ReadKey()
End Sub
End Module
。
答案 0 :(得分:0)
iframe
中有form
似乎有点难看。我认为在这种情况下不存在类似标准的东西。您已经自己回答了问题:
<iframe id="iframe_role" name="iframe_role">
</iframe>
<form id="form_role">
</form>
是纯粹的 HTML 。