Home > Web Front-end > JS Tutorial > Ext today's learning summary_YUI.Ext related

Ext today's learning summary_YUI.Ext related

WBOY
Release: 2016-05-16 18:19:28
Original
1072 people have browsed it

If you open it without double-clicking it, it will not be read. To put it bluntly, it is just like opening an email: there are read and unread messages. The first problem according to my thinking is to block IE F5 refresh while requesting Grid data! That’s OK! The second one is to write a return style in VeiwConfig! Just change the isread status in record and it will be OK!
First question: Code:

Copy code The code is as follows:

document.onkeydown = function(){
if (event.keyCode == 116) {
event.keyCode=0;
event.returnValue=false;
//Requesting Grid data seems to be win R It can also be refreshed
//You can set breakpoints to debug and take a look at the Even.KeyCode encoding and leave it for everyone to think about
}
}

Expand it: I wrote one before Prevent backspace from exiting the system. Some forms are set to be read-only and it will be very depressing to press backspace to exit the system!
Code:
Copy code The code is as follows:

document.onkeydown = function() {
if (event.keyCode == 8) {
if((event.srcElement.nodeName != "INPUT" && event.srcElement.nodeName != "TEXTAREA") || event.srcElement.readOnly = = true)
{
event.cancelBubble = true;
return false;
}
}
}

Hey, second question! I thought I had written a Grid before to change the color of the data! Depend on! It says to make it bold!
I will use the style from an article I wrote before! It just so happens that I don’t know that the home page has been processed with Delphi, nor does my F12 debugging tool! I'm depressed! There is no Vs series installed! It took a long time!
There is actually a problem!
The style has the previous ones:
Copy code The code is as follows:

.x-grid -record-red table{
color:#FF0000 ;
}

becomes
Copy code The code is as follows:

.x-grid-record-red tabel{
font-weight: bolder ;
}

i Fainting has no effect! I just googled and debugged like crazy
Then I didn’t know what was written in that article. I just changed the tabel to td and that was it. I fainted!
Rewrite the status to read in the double-click open event
Copy the code The code is as follows:

'rowdblclick':function(grid,i){
grid.store.data.items[i]. set('isread','2'); //1 unread 2 read
}
Related labels:
ext
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template