I haven't paid attention to this problem all the time. I wanted to do this today:
Copy codeThe Code is as follows:Var str = 'Hello world 8024 ';
Str. substr (-4, 4 );
A negative number is counted from the end.
Should Return: 8024
But found the
Overview
When we use JS to render the DOM, we generally use a string to create the DOM and then attach it to the parent element. If the appended DOM is dynamically changeable, We need to write a lot of logic in the function. If the control is
1. Handling Iframe adaptive height under the same domain name Copy codeThe Code is as follows: Of course, here I use Asp. Net MVC. Here src is set as the routing structure.Copy codeThe Code is as follows: When an iframe nested page is loaded, the
If you encounter problems during troubleshooting, record them by the way,Copy codeThe Code is as follows:Function OnOpenWin (){If (window. name! = "OAopenWindow "){Win = window. open ("login. aspx "," OAopenWindow "," toolbar = no, menubar = no,
Js Code of the preview image:
Copy codeThe Code is as follows:
The fileupload control and the image used to preview the image:
Copy codeThe Code is as follows:
The function is very simple, and the code is easy to understand. I believe you can
Recently, the project requires a simple multi-level drop-down menu, but due to business and style requirements, it is not suitable to find many navigation menu controls on the Internet for simplicity, so I want to write it myself ~ Do it now ~HTML
Copy codeThe Code is as follows:// Parameter obj: Specifies the jquery object of the element of the selected text to be disabled.// Parameter enabled: true, optional; false, not selectedFunction setSelectable (obj, enabled ){If (enabled ){Obj.
DIV + CSS + JS implements uninterrupted horizontal scrolling codeCopy codeThe Code is as follows: div css code scrolling horizontally without interruption-DIVCSS5 DIVCSS5 demo Description: Scroll left
Today, I saw some people in the group initiate some interview questions before renrenren. I have reposted some questions before. I am just idle and choose one question to do it and practice it.This question has the following requirements::1. Use
There are many ways to register events for some elements in html.First:Copy codeThe Code is as follows: test Second:Copy codeThe Code is as follows: test Third (W3C model ):Copy codeThe Code is as follows: test Among the three parameters,
Another form of linkage box, the linkage box on the right is generated using jquery This is based on the js method modified in the previous article.Let's take a look at the code on the page:Copy codeThe Code is as follows: event region: & Lt; td
When creating a project, the customer puts forward this requirement. When entering data in the text box in the list, you must be able to switch the cursor by pressing the up or down key, and press the Enter key to move the cursor to the next text
Interpreter mode (Interpreter): defines a syntax format, implements it through program interpretation and completes the corresponding task. In front-end programming scenarios, you can apply the interpreter mode to interpret the CSS selector for DOM
By default, javascript is loaded synchronously, that is, it is blocked during javascript loading. The subsequent elements can be loaded only after javascript loading is complete. For some javascript that is not very significant, if it is placed in
Chain callChained call is actually just a syntax trick. It allows you to reuse an initial operation to express complex operations with a small amount of code. This technology includes two parts:
A factory that creates an object that represents an
Query small applications of DBpedia using JavascriptIn the previous article, we learned about SPARQL and SPARQL Endpoint, and made a simple SPARQLWrapper. js to query some data from DBpedia.This article tries to use SPARQLWrapper. js to read the
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