A good UBB encoding function implemented using JavaScript

Function jsubb (STR){VaR Re = // [I/] (. [^/[] *)/[// I/]/GI;STR = Str. Replace (Re, " $1 "); // ItalicRe = // [B/] (. [^/[] *)/[// B/]/GI;STR = Str. Replace (Re, " $1 "); // boldRe = // [U/] (. [^/[] *)/[// U/]/GI;STR = Str. Replace (Re, " $1 "); //

Void (0) in Javascript

In JavaScript, void is an operator that specifies to calculate an expression but does not return a value. The format of the void operator is as follows:1. javascript: void (expression)2. javascript: void expression Expression is a standard

Allows JavaScript to contain files as well.

Javascript is powerful, but one problem is that it cannot contain other JS files, while other non-scripting languages basically have this function, so I have to feel a bit sorry. When the problem is getting worse, it is increasingly found that

Compilation of JavaScript IE and Firefox compatibility

Internet Explorer is replaced by IE and mozzila Firefox is replaced by MF. 1. Document. Form. Item Problems(1) existing problems:ExistingCodeThere are many statements such as document. formname. Item ("itemname"), which cannot be run in MF.(2)

Javascript Window Function guide-Writing content in a window

Window. open () method to open a new window, document. open () method to open a new document, where you can use the write () or writeln () method to write content. Its syntax is: Onewdoc = Document. Open (smimetype [, sreplace]); Sminetype is a

How to drag page 1/2 using JavaScript

Translated from:Http://www.webreference.com/programming/javascript/mk/column2/index.htmlAll Copyrights belong to the original Javascript is characterized by Dom processing and web page effects. In most cases, we only use the simplest functions of

Several Methods to remove spaces in Javascript

Method 1: In my opinion, the best method is to use regular expressions, which is the core principle.Secondly, this method uses the prototype attribute of JavaScript. In fact, you can use functions without using this attribute, but it is more

JavaScript uses prototype to define Object Types

From: JavaEye.com prototype provides a JavaScript object-oriented infrastructure, which can be used for object-oriented programming. The method for defining object types is as follows: Var Person = Class. create (); Person. prototype = {initialize:

Code for converting javascript Chinese characters to PinYin

only some Chinese characters can be implemented. \#%{} | ^ ~ [] '&? + Abc "name =" source "> enter the abbreviation of the name, as shown in Figure zsh) Zhang San Zhang sanhuo Li Si Li sishui var sel = "", timer = null; function

Optimization of JavaScript script Performance

From: http://www.nirvanastudio.org/javascript/improve-javascript-performance.html Author: ShiningRay @ Nirvana Studio With the development of the network, network speed and machine speed, more and more websites use a variety of client technologies.

Use JavaScript and registry scripts to right-click and add selected text to the favorites web page

Two days ago found a good site on the Internet, is used to do data collection (http://wolf.360doc.com ). This website provides such a function to directly add the selected text to your favorites. At that time, it was amazing. Later I studied and

Webpage javascript essence code set

[1. Normal pop-up window] are used for some earlier browsers, and the code in the tag is not displayed as text in these old browsers. . You can use single quotes and double quotes, but do not mix them. [2. After setting, the pop-up window is

Inheritance of objects in javascript [Post 〕

1. apply and call functions of javascriptPrototype. js uses a large number of apply and call functions, which may cause misunderstanding if you do not pay attention to them. Official explanation: apply a method of an object and replace the current

JavaScript classic effect set

Some useful and necessary small script code: Script 1: automatically play audio after entering the home page Script 2: Enter the homepage and click Script 3: displays the current time script Script 4: displays the last modified time script. Script 5:

A javascript encryption tool is recommended.

PACKER2.0.2, an open-source tool for JAVASCRIPT Encryption This is not a very complex coding tool, which can be directly recognized by the browser After encoding. Sina is in use. For example: http://comment4.news.sina.com.cn/comment/cmnt_xml.js Go

Javascript example tutorial (19) Use HoTMetal (4)

Use javascript in HoTMetal 4. How to write a script in the document format The following is an example of a macro: format the document based on the predefined page layout rules. To observe the macro effect, disable the Enable Source Layout (allow

Several methods related to Array objects in JavaScript

Push method Add the new element to an array and return the new Length Value of the array. ArrayObj. push ([item1 [item2 [... [itemN]) ParametersArrayObj is required. An Array object.Item, item2,... itemN is optional. The new element of the

Page 1/3 of javascript Functions

Author: F. PermadiTranslator: Sheneyan (zi Wu)Introduction to JavaScript Functions(Example): javascript FunctionsZi wunote: This is a very good function getting started article. I personally think it is quite classic. Word Translation list: Function:

Obtain the selected text in the text box and dynamically Insert the JavaScript code of the text.

Copy codeThe Code is as follows: Function AppTag (tagcode) { Document. PostMessage. Message. value + = tagcode; } Function InsertTag (tagbegin, tagend){If (document. selection) & (document. selection. type = "Text ")){Var range = document.

Javascript _ Javascript tutorial

JavaScript: javascript scope, Javascript tutorial

Total Pages: 5378 1 .... 1953 1954 1955 1956 1957 .... 5378 Go to: GO

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.