YJGX007 9CBS Answer ASP and JavaScript Question Collection

xiaoxiao2021-03-06  112

http://blog.9cbs.net/yjgx007

The 9CBS WEB area has been two years (most of them are in the JavaScript area), and there is no time to organize the more good issues that have been answering in 9cs. Most discussion topics are no longer existed. Today, there is time, now collected. Some considered a better common problem.

ASP problem, JavaScript problem:

Q: How much is the length of the JavaScript array?

See MSDN: --------------- if Only One Argument IS Passed To The Array Construction, and The Argument Is A Number, IT Must Be An Unsigned 32-Bit Integer (

--------------- If you construct this array with only one parameter, and this parameter is a number, it must be an unsigned 32-bit integer (less than about 4 billion), thus this The numbers become the size of this array.

Q: Is there a function of testing a client system, such as the system used by the user is a traditional system or a Simplified system, or the function of the test client's area settings !!

I only know that in addition to getting client browser information in ASP, you can also get system / version with JScript Navigator objects.

See MSDN for details

Q:

I want to get a TR string now how to get a TR string now? How can I use CreateElement?

Q: What is the regular expression of the naming group in JavaScript, then how does it take to replace or remove the value of the name match?

Str = "123456789324"; Alert (Str.Replace (/ (/ D {4}) (/ D {5}) / g, "$ 1- $ 2- $ 3"));

Q: How do I display it? Heroes help me see my code:

<% id = request ("id") server.createObject ("adoDb.recordset") ssql = "select img from mynews where id = ' "& id &" '"RSPIC.Open SSQL, CONN, 3, 3 Response.ContentType =" Image / * "Response.binaryWrite RSPIC (" IMG "). getchunk (7500000)' response.binarywrite rs.fields (" logo_img ") Response.write (" end of the file "rspic.close set rspic = NOTHING%> Take a look at whether your ASP file contains HTML code, if there is, then delete, otherwise it does not appear image, SQL Server storage image data will filter out the last / 0 endue, after removing, add / 0 end character response.binarywrite rs.fields ("logo_img") & chrb (0)

Q: Data type problem for parameters

Function editit (id) {page = "admin =" ID window.Open (Page, 'Editing User', 'Width = 500, Height = 350')}

View / Edit

RS ("UserID") is a varchar type. When its value is a number, such as "0001", the above program is normal, but if its value is a string, if it is "Student", the program will report an error: 'Student' definition.

Ask a master how to solve it? ?

The parameter variable type of the pass value is not defined, you are passing as a variable, and this variable is not defined, the runtime will capture this error, plus quotation marks, as a constant, will not report error

Q: Ask for simple and efficient judgment IE version of JS

With (Navigator) {alert (appname == "Microsoft Internet Explorer" && paraSeint (appversion) == 4);

Q: How do I determine whether XMLHTTP successfully reads the content of the webpage?

Var obj = new activityXObject ("Microsoft.xmlhttp"); Obj.Open ("POST", "Server.asp? SEL =" STR, FALSE); Obj.send ();

----------------

Execute Obj.send (); how to determine if XMLHTTP successfully reads the content of the webpage?

Try: if (Obj.status == 200) gethtml = obj.ResponseText; Note: Obj.Open ("post", "server.asp? SEL =" str, true); // Last a parameter must be ture asynchronous transmission

Q: WINDOW.SHOWMODELESSDIALOG has produced this window, how can you change the size of this window?