Use JS to get the ID with focus control: Copy code code as follows: $ ("#textid"). Click (function () {var act = document.activeElement.id; if (act == "textID") {Alert ("" T
The first type: JS automatically closes the window regularly <script language="javascript"><!--function closewin(){self.opener=null;self.close();}function clock(){i=i-
Everyone knows that we use a variety of INPUT forms when submitting Form. But not every INPUT form can be obtained by the method of document.GetelementByid. Some combinations are similar to Checkbox or Radio or Select
As shown below: Copy the code. The code is as follows:///Get the parameters specified in the url//<param name="paras"> Parameter name</param> ///function request(paras) {var url = location.href;var pa
1. Dynamically create select copy code. The code is as follows: function createSelect(){var mySelect = document.createElement_x("select");mySelect.id = "mySelect";
1. The iframe copy code code in the parent page is as follows:<iframe name="parentPage"></iframe> 2. The attribute copy code of elements in the subpage is as follows:
Small knowledge points, not much nonsense, directly on the code CSS: Copy code code as follows:<pre name="code"><style> #anchor:{ position:absulate; top:40%; left:40%; width:100px; he
Copy the code. The code is as follows: // Determine whether the file is being used function FileINUse(filename:String):boolean;varusein:file;beginresult:=false;assignfile(usein,Fil
Matter: 1. It was found that there were insufficient instances and could not be hovered (to be solved) 2. The system could not randomly and automatically color (to be solved). First, a high-profile website using the tag cloud - the photo sharing website F
The design of the Javascript language is not rigorous enough, and errors can occur in many places if you are not careful. For example, consider the following situation. Now, we need to determine whether a global object myObj exists. If it does not exist,
The JS code provided in some web page advertisements can be code-injected and then monitor various elements. The following example is to monitor the input value of Baidu input box and then display it. The code code is copied as follows: ;(function() { fun
When the mouse focuses on the email address text box, the text "Please enter email address" in the text box is cleared. Reproduction diagram: Copy the code code as follows: <%@ Page Language="C#" AutoEventWireup="true" Cod