| has a complete end tag  table>  tr>  td>  th> Some lack of some no relationships 6 Index according to the name No Document.all, this is the reason why most JavaScript functions cannot be used; Document.getElementByID (ID) is available, but just support ID, do not support press NAME index (If you want to use the Element_name or ID index, you can consider the new function to join Util.asp: Document_all (Element_name_or_id) See Usage 1) Note: Netscape4.8 does not support Document. GetElementByid and Document.All Document.all (Element_name_or_id) Seduce About CSS Class = class_name (Class_name is case sensitive, and Border-Collapse: Collapse is not supported, which is the main reason for the ugly interface) The first class in .CSS does not work Class = class_name (Class_name is not case sensitive) 8 The ability of Switch in the low version of JavaScript is very poor, and the variable Case is not supported. Note: I have measured Nerscapte6.1 or above, supporting case 9 Element reference 2 Case the ID of the element, case sensitive When the ID is referenced, it is not case sensitive. 10 Cursor display Cursor: Pointer (IE6 supports Pointer; IE5 does not support Pointer) Cursor: HAND 11 InnerText InnerHTML instead of InnerText Netscape6.0   does not support inNerText 12caption> (Table properties) For Netscape, CAPTION appears on the left side of Table, as shown in Figure 1 For IE, CAPTION appears on the left side of Table, As with Figure 2 13 The display attributes for Netscape, do not affect other columns of the corresponding columns for IE,  affect other columns corresponding to 14 Element reference 3 When the element is not within the Form, the reference element uses Document.GtelementByid ("TBLROLE"). Window.tblrole can be in IE. 15 Custom properties are used. Some interfaces are used to save the value, and Netscape does not support Tr.PRJ_CODE. You need to use Objelm.attributes.getNameDItem (StratRName) .value. Note: Function getElementAttribute (Objelm, StratRName) has been written in Util.asp, which can be called directly. Tr.PRJ_CODE can take a value. 16 Event Event and take event source elements Netscape uses "event .target" without supporting Event. Srcelement takes the event source element. Netscape can also get an event directly with Event, which can consider "Event to get Event to JavaScript when triggering events". Note: Event_srcelement (Objevent) has been written in util.asp to get the event source element. Methods of triggering events such as: Event. Srcelement In one FORM Document.formname must be used in Netscape, Document.formname can be used in IE and Window.FormName 18 Table operation TableID.Rows [i] .cells [i] .childnodes [i] No use in NetScpate () TableID.Rows [i] .cells [i] .childnodes [i] TableID.ROWS (i) .Cells (i) .childNodes (i) 19 TableID.Rows [i] .cells [i] .childnodes [i] .length different issues There are two kinds of child node type, one is element node; (nodetype = 1), the other is Text Node (nodetype = 3), can traverse all sub-nodes, delete all text node, or modify HTML code , Delete extra spaces method one: VAR TBL1 = Document.getlementByid ("Table1"); For (i = 0; i 
{ Var Temp = tbl1.childNodes [i]; IF (Temp.NodeType == 3) { TBL1.RemoveChild (TEMP); } } 20 Parentelement ParentNode Parentelement cannot be used in Netscape Parentelement ParentNode twenty one Srcelement IE uses srcelement, Netscape with Target, IE can't use Target twenty two Children, childnodes ChildNodes Children, childnodes twenty three Radiobutton appears multiple choices in Netscape Radiobutton must be placed in  twenty four Msxml.dll Netscape: VARXMLDOC = Document.Implementation.createdocument (",", ", null); VAR XMLServerHttp = new xmlhttpRequest (); IE: VAR XMLDoc = New ActiveXObject ("msxml2.domdocument"); VAR XMLServerHttp = New ActiveXObject ("msxml2.xmlhttp"); IE support: xmldoc.load (filename) and XMLDoc.LoadXML (String) NS only supports xmldoc.load (filename) method IF (Navigator.Appname == "Microsoft Internet Explorer") // ie { VAR XMLDoc = New ActiveXObject ("msxml2.domdocument"); VAR XMLServerHttp = New ActiveXObject ("msxml2.xmlhttp"); Xmldoc.async = false; XMLDoc.LoadXML (XMLSTR); XMLServerHttp.Open ("Post", Tourl, False; XMLServerhttp.send (XMLSTR); RE = XMLServerHttp.ResponseText; } Else { VAR XMLDoc = Document.Implementation.createdocument (",", ", null); VAR XMLServerhttp = new xmlhttprequest (); VAR DOM = New Domparser (); Xmldoc.async = false; Var Domdoc = Dom.Parsefromstring (Xmlstr, "Text / XML"); XMLDoc.Load (Domdoc); XMLServerHttp.Open ("Post", Tourl, False; XMLServerhttp.send (Domdoc); RE = XMLServerHttp.ResponseText; } SponorgxmlForUpdate1 = "" if (navigator.appName == "Microsoft Internet Explorer") // IE {var xmlDoc = new ActiveXObject ( "Msxml2.DOMDocument"); xmlDoc.async = false; xmlDoc.loadXML (SponOrgXMLforUpdate1); node = xmlDoc.selectSingleNode ( " // sponsor_org ");} else {var Dom = new domparser (); var xmldoc = dom.parsefromstring (sponorgxmlForupdate1, 'text / xml'); var node = xmldoc.getElementsBytagname ('sponsor_org') [0];} 25 
 Value: Tr1.attributes.getnamedItem ("a") .value Tr1.attributes.getnamedItem ("b") .value assignment or set attribute Tr1.SetaTRibute ("a", "a1") Tr1.SetaTRibute ("B", "B1"); Tr1.a Tr1.b 26 Give it a box to add an Option VAR newopt = new option (Text, Value, False, False); select.Options [select.Options.Length] = newopt; VAR OPTION = Document.createElement ("option"); OOption.text = ""; OOption.Value = ""; select.add (OOption); 27 Delete an Option of the drop-down box Select.Options [i] = null; Select.Options [i] = null; Select.Options.remove (i); Web pages require some matter to pay attention to Netscape, mainly from JavaScript writing The younger brother is changing a system that the company uses ASP to support Netscape, which is not available for NetsAcpe, not much, and new discovery is added in the future. 
转载请注明原文地址:https://www.9cbs.com/read-69913.html 
 |