目錄
Common Causes, Diagnosis, and Actions
Sequential Reads Against Indexes
Sequential Reads Against Tables
System-Level Diagnosis
首頁 資料庫 mysql教程 dbfilesequentialread等待事件总结

dbfilesequentialread等待事件总结

Jun 07, 2016 pm 03:22 PM
事件 總結 等待

db file sequential read The db file sequential read wait event has three parameters: file#, first block#, and block count. In Oracle Database 10 g , this wait event falls under the User I/O wait class. Keep the following key thoughts in mi

db file sequential read

The db file sequential read wait event has three parameters: file#, first block#, and block count. In Oracle Database 10g, this wait event falls under the User I/O wait class. Keep the following key thoughts in mind when dealing with the db file sequential read wait event.

该等待事件的参数:file#,first block#,and block count(一般是1)可以从dba_extents去确定访问的段,属于I/O类的等待。

    The Oracle process wants a block that is currently not in the SGA, and it is waiting for the database block to be read into the SGA from disk.

    The two important numbers to look for are the TIME_WAITED and AVERAGE_WAIT by individual sessions.

    Significant db file sequential read wait time is most likely an application issue.

    Common Causes, Diagnosis, and Actions

    The db file sequential read wait event is initiated by SQL statements (both user and recursive) that perform single-block read operations against indexes, rollback (or undo) segments, and tables (when accessed via rowid), control files and data file headers. This wait event normally appears as one of the top five wait events, according to systemwide waits.

    Physical I/O requests for these objects are perfectly normal, so the presence of the db file sequential read waits in the database does not necessarily mean that there is something wrong with the database or the application. It may not even be a bad thing if a session spends a lot of time on this event. In contrast, it is definitely bad if a session spends a lot of time on events like enqueue or latch free. This is where this single-block read subject becomes complicated. At what point does the db file sequential read event become an issue? How do you define excessive? Where do you draw the line? These are tough questions, and there is no industry standard guideline. You should establish a guideline for your environment. For example, you may consider it excessive when the db file sequential read wait represents a large portion of a process response time. Another way is to simply adopt the nonscientific hillbilly approach—that is, wait till the users start screaming.

    You can easily discover which session has high TIME_WAITED on the db file sequential read wait event from the V$SESSION_EVENT view. The TIME_WAITED must be evaluated with the LOGON_TIME and compared with other nonidle events that belong to the session for a more accurate analysis. Sessions that have logged on for some time (days or weeks) may accumulate a good amount of time on the db file sequential read event. In this case, a high TIME_WAITED may not be an issue. Also, when the TIME_WAITED is put in perspective with other nonidle events, it prevents you from being blindsided. You may find another wait event which is of a greater significance. Based on the following example, SID# 192 deserves your attention and should be investigated:

    当进程需要的信息不在SGA,要等从磁盘读入SGA中,此时进程等待此事件。

    一般是由sql或者递归sql中发出,从索引,回滚段,表(rowid回表),控制文件,数据文件头处读取信息。

    select a.sid,
           a.event,
           a.time_waited,
           a.time_waited / c.sum_time_waited * 100 pct_wait_time,
           round((sysdate - b.logon_time) * 24) hours_connected
    from   v$session_event a, v$session b,
           (select sid, sum(time_waited) sum_time_waited
            from   v$session_event
            where  event not in (
                        'Null event',
                        'client message',
                        'KXFX: Execution Message Dequeue - Slave',
                        'PX Deq: Execution Msg',
                        'KXFQ: kxfqdeq - normal deqeue',
                        'PX Deq: Table Q Normal',
                        'Wait for credit - send blocked',
                        'PX Deq Credit: send blkd',
                        'Wait for credit - need buffer to send',
                        'PX Deq Credit: need buffer',
                        'Wait for credit - free buffer',
                        'PX Deq Credit: free buffer',
                        'parallel query dequeue wait',
                        'PX Deque wait',
                        'Parallel Query Idle Wait - Slaves',
                        'PX Idle Wait',
                        'slave wait',
                        'dispatcher timer',
                        'virtual circuit status',
                        'pipe get',
                        'rdbms ipc message',
                        'rdbms ipc reply',
                        'pmon timer',
                        'smon timer',
                        'PL/SQL lock timer',
                        'SQL*Net message from client',
                        'WMON goes to sleep')
            having sum(time_waited) > 0 group by sid) c
    where  a.sid         = b.sid
    and    a.sid         = c.sid
    and    a.time_waited > 0
    and    a.event       = 'db file sequential read'
    order by hours_connected desc, pct_wait_time;
    
    
     SID EVENT                   TIME_WAITED PCT_WAIT_TIME HOURS_CONNECTED
    ---- ----------------------- ----------- ------------- ---------------
     186 db file sequential read       64446    77.0267848             105
     284 db file sequential read     1458405     90.992838             105
     194 db file sequential read     1458708    91.0204316             105
     322 db file sequential read     1462557    91.1577045             105
     139 db file sequential read      211325    52.6281055              11
     256 db file sequential read      247236    58.0469755              11
    ?<strong>192 db file sequential read      243113    88.0193625               2</strong>
    
    登入後複製

    There are two things you can do to minimize the db file sequential read waits:

      Optimize the SQL statement that initiated most of the waits by reducing the number of physical and logical reads.

      Reduce the average wait time.

      Unless you trace a session with the event 10046 or have a continuously running wait event data collector as discussed in Chapter 4, it is difficult to determine the SQL statement that is responsible for the cumulated wait time. Take the preceding SID #192 again, for example. The 243113 centiseconds wait time may be caused by one long-running or many fast SQL statements. The latter case may not be an issue. Furthermore, the SQL statement that is currently running may or may not be the one that is responsible for the waits. This is why interactive diagnosis without historical data is often unproductive. You can query the V$SQL view for statements with high average DISK_READS, but then how can you tell they belong to the session? Due to these limitations, you may have to identify and trace the session the next time around to nail down the offending SQL statement. Once you have found it, the optimization goal is to reduce the amount of physical and logical reads.

      Note

      In addition to the DISK_READS column, the V$SQL and V$SQLAREA views in Oracle Database 10g have exciting new columns: USER_IO_WAIT_TIME, DIRECT_WRITES, APPLICATION_WAIT_TIME, CONCURRENCY_WAIT_TIME, CLUSTER_WAIT_TIME, PLSQL_EXEC_TIME, and JAVA_EXEC_TIME. You can discover the SQL statement with the highest cumulative or average USER_IO_WAIT_TIME.

      Another thing you can do to minimize the impact of the db file sequential read event is reduce the AVERAGE_WAIT time. This is the average time a session has to wait for a single block fetch from disk; the information is available in the V$SESSION_EVENT view. In newer storage subsystems, an average single-block read shouldn’t take more than 10ms (milliseconds) or 1cs (centisecond). You should expect an average wait time of 4 to 8ms (0.4 to 0.8cs) with SAN (storage area network) due to large caches. The higher the average wait time, the costlier it is to perform a single-block read, and the overall process response time will suffer. On the other hand, a lower average wait time is more forgiving and has a lesser impact on the response times of processes that perform a lot of single-block reads. (We are not encouraging you to improve the average wait time to avoid SQL optimization. If the application has SQL statements that perform excessive amounts of single-block reads, they must first be inspected and optimized.) The db file sequential read “System-Level Diagnosis” section has some ideas on how to improve the AVERAGE_WAIT time.

      As you monitor a session and come across the db file sequential read event, you should translate its P1 and P2 parameters into the object that they represent. You will find that the object is normally an index or a table. The DBA_EXTENTS view is commonly used for object name resolution. However, as mentioned in Chapter 4, the DBA_EXTENTS is a complex view and is not query-friendly in regards to performance. Object name resolution is much faster using the X$BH and DBA_OBJECTS views. The caveat is that you must wait for the block to be read into the buffer cache; otherwise the X$BH view has no information on the buffer that is referenced by the P1 and P2 parameters. Also, the DBA_OBJECTS view does not contain rollback or undo segment objects that the P1 and P2 parameters may be referencing.

      要减少这个等待事件,要么减少它的次数,要么减少平均等待时间。通过调优SQL来减少逻辑读,留意效率低的大范围索引扫描回表(可能全表扫更好),可以减低次数。用更高响应时间的存储,分散热点文件,可以减轻平均等待时间。在新的存储子系统,平均单块读等待时间不应超过10ms(千分之一秒),如果用有大cache的SAN一般4-8ms为佳。通过p1与p2参数与dba_extents视图,我们定位到等待访问的段,然后来分散热点。

      --这段SQL的找出频繁发生db file sequential read的对象。

      select b.sid,
             nvl(substr(a.object_name,1,30),
                        'P1='||b.p1||' P2='||b.p2||' P3='||b.p3) object_name,
             a.subobject_name,
             a.object_type
      from   dba_objects a, v$session_wait b, x$bh c
      where  c.obj = a.object_id(&#43;)
      and    b.p1 = c.file#(&#43;)
      and    b.p2 = c.dbablk(&#43;)
      and    b.event = 'db file sequential read'
      union
      select b.sid,
             nvl(substr(a.object_name,1,30),
                        'P1='||b.p1||' P2='||b.p2||' P3='||b.p3) object_name,
             a.subobject_name,
             a.object_type
      from   dba_objects a, v$session_wait b, x$bh c
      where  c.obj = a.data_object_id(&#43;)
      and    b.p1 = c.file#(&#43;)
      and    b.p2 = c.dbablk(&#43;)
      and    b.event = 'db file sequential read'
      order  by 1;
      
        SID OBJECT_NAME               SUBOBJECT_NAME            OBJECT_TYPE
      ----- ------------------------- ------------------------- -----------------
         12 DVC_TRX_REPOS             DVC_TRX_REPOS_PR64        TABLE PARTITION
        128 DVC_TRX_REPOS             DVC_TRX_REPOS_PR61        TABLE PARTITION
        154 ERROR_QUEUE               ERROR_QUEUE_PR1           TABLE PARTITION
        192 DVC_TRX_REPOS_1IX         DVC_TRX_REPOS_20040416    INDEX PARTITION
        194 P1=22 P2=30801 P3=1
        322 P1=274 P2=142805 P3=1
        336 HOLD_Q1_LIST_PK                                     INDEX
      
      登入後複製

      Sequential Reads Against Indexes

      The main issue is not index access; it is waits that are caused by excessive and unwarranted index reads. If the db file sequential read event represents a significant portion of a session’s response time, all that tells you is that the application is doing a lot of index reads. This is an application issue. Inspect the execution plans of the SQL statements that access data through indexes. Is it appropriate for the SQL statements to access data through index lookups? Is the application an online transaction processing (OLTP) or decision support system (DSS)? Would full table scans be more efficient? Do the statements use the right driving table? And so on. The optimization goal is to minimize both the number of logical and physical I/Os.

      If you have access to the application code, you should examine the application logic. Look at the overall logic and understand what it is trying to do. You may be able to recommend a better approach.

      Index reads performance can be affected by slow I/O subsystem and/or poor database files layout, which result in a higher average wait time. However, I/O tuning should not be prioritized over the application and SQL tuning, which many DBAs often do. I/O tuning does not solve the problem if SQL statements are not optimized and the demand for physical I/Os remains high. You should also push back when the application team tries to circumvent code changes by asking for more powerful hardware. Getting the application team to change the code can be like pulling teeth. If the application is a rigid third-party solution, you may explore the stored outline feature, introduce new indexes, or modify the current key compositions whenever appropriate.

      In addition to SQL tuning, it may also be worthwhile to check the index’s clustering factor if the execution plan calls for table access by index rowid. The clustering factor of an index defines how ordered the rows are in the table. It affects the number of I/Os required for the whole operation. If the DBA_INDEXES.CLUSTERING_FACTOR of the index approaches the number of blocks in the table, then most of the rows in the table are ordered. This is desirable. However, if the clustering factor approaches the number of rows in the table, it means the rows in the table are randomly ordered. In this case, it is unlikely for the index entries in the same leaf block to point to rows in the same data block, and thus it requires more I/Os to complete the operation. You can improve the index’s clustering factor by rebuilding the table so that rows are ordered according to the index key and rebuilding the index thereafter. What happens if the table has more than one index? Well, that is the downside. You can only cater to the most used index.

      Also check to see if the application has recently introduced a new index using the following query. The introduction of a new index in the database may cause the optimizer to choose a different execution plan for SQL statements that access the table. The new plan may yield a better, neutral, or worse performance than the old one.

      cluster_factor——表明有多少邻近的索引条目指到不同的数据块。如果表里的数据与索引排序是相似的,聚簇因子就小,最小值是表里非空的数据块总数。如果表里的数据和索引排序迥异,聚簇因子就大,最大值是索引中的键数。值越小,越表明表行是有序存储的

      select owner, 
             substr(object_name,1,30) object_name, 
             object_type, 
             created
      from   dba_objects
      where  object_type in ('INDEX','INDEX PARTITION')
      order by created;
      登入後複製

      The OPTIMIZER_INDEX_COST_ADJ and OPTIMIZER_INDEX_CACHING initialization parameters can influence the optimizer to favor the nested loops operation and choose an index access path over a full table scan. The default value for the OPTIMIZER_INDEX_COST_ADJ parameter is 100. A lower value tricks the optimizer into thinking that index access paths are cheaper. The default value for the OPTIMIZER_INDEX_CACHING parameter is 0. A higher value informs the optimizer that a higher percentage of index blocks is already in the buffer cache and that nested loops operations are cheaper. Some third-party applications use this method to promote index usage. Inappropriate use of these parameters can cause significant I/O wait time. Find out what values the sessions are running with. Up to Oracle9i Database, this information could only be obtained by tracing the sessions with the trace event 10053 at level 1 and examining the trace files. In Oracle Database 10g, this is as simple as querying the V$SES_OPTIMIZER_ENV view.

      Make sure all object statistics are representative of the current data, as inaccurate statistics can certainly cause the optimizer to generate poor execution plans that call for index reads when they shouldn’t. Remember, statistics need to be representative and not necessarily up-to-date, and execution plan may change each time statistics are gathered.

      Note

      When analyzing tables or indexes with a low ESTIMATE value, Oracle normally uses single block reads, and this will add to the db file sequential read statistics for the session (V$SESSION_EVENT) and instance (V$SYSTEM_EVENT).

      Sequential Reads Against Tables

      You may see db file sequential read wait events in which the P1 and P2 parameters resolve to a table instead of an index. This is normal for SQL statements that access tables by rowids obtained from the indexes, as shown in the following explain plan. Oracle uses single-block I/O when reading a table by rowids.

      LVL OPERATION                         OBJECT                
      --- --------------------------------- ---------------------
        1 SELECT STATEMENT 
        2   TABLE ACCESS BY INDEX ROWID     RESOURCE_ASGN_SNP   
        3     INDEX RANGE SCAN              RESOURCE_ASGN_SNP_4IX
      登入後複製

      System-Level Diagnosis

      The V$SYSTEM_EVENT view provides the data for system-level diagnosis. For I/O related events, the two columns of interest are the AVERAGE_WAIT and TIME_WAITED.

      Remember to evaluate the TIME_WAITED with the instance startup in mind. It is normal for an older instance to show a higher db file sequential read wait time. Also, always query the V$SYSTEM_EVENT view in the order of TIME_WAITED such as in the following example. This allows you to compare the db file sequential read waits with other significant events in the system. If the db file sequential read wait time is not in the top five category, don’t worry about it because you have bigger fish to fry. Even if the db file sequential read wait time is in the top five category, all it tells you is that the database has seen a lot of single-block I/O calls. The high wait time may be comprised of waits from many short-running OLTP sessions or a few long-running batch processes, or both. At the system level, there is no information as to who made the I/O calls, when the calls were made, what objects were accessed, and the SQL statements that initiated the calls. In other words, system-level statistics offer very limited diagnosis capability.

      select a.event, 
             a.total_waits, 
             a.time_waited, 
             a.time_waited/a.total_waits average_wait,
             sysdate – b.startup_time days_old
      from   v$system_event a, v$instance b
      order by a.time_waited;
      登入後複製

      The AVERAGE_WAIT column is more useful. We showed what you should consider as normal in the preceding paragraphs. If your average single-block read wait time exceeds this allowance, you may have a problem in the I/O subsystem or hot spots on disk. If your database is built on file systems, make sure the database mount points contain only Oracle files. Do not share your database mount points with the application or another database. Also, if possible, avoid sharing I/O devices. Several mount points can be mapped to the same I/O device. According to the following Veritas vxprint output, mount points u02, u03, u04, and u05 are all mapped to device c2t2d0. You should find out how your database files are mapped to I/O controllers and I/O devices or physical disks. For databases on the Veritas file system, the vxprint –ht command shows the mount point mappings.

      v  oracle_u02   -            ENABLED  ACTIVE   20480000 fsgen  -      SELECT
      pl oracle_u02-01 oracle_u02  ENABLED  ACTIVE   20482560 CONCAT -      RW
      sd oracle01-01  oracle_u02-01 oracle01 0       20482560 0      <strong>c2t2d0</strong> ENA
      
      
      v  oracle_u03   -            ENABLED  ACTIVE   20480000 fsgen  -      SELECT
      pl oracle_u03-01 oracle_u03  ENABLED  ACTIVE   20482560 CONCAT -      RW
      sd oracle01-02  oracle_u03-01 oracle01 20482560 20482560 0     <strong>c2t2d0</strong> ENA
      
      
      v  oracle_u04   -            ENABLED  ACTIVE   20480000 fsgen  -      SELECT
      pl oracle_u04-01 oracle_u04  ENABLED  ACTIVE   20482560 CONCAT -      RW
      sd oracle01-03  oracle_u04-01 oracle01 40965120 20482560 0     <strong>c2t2d0</strong> ENA
      
      
      v  oracle_u05   -            ENABLED  ACTIVE   30720000 fsgen  -      SELECT
      pl oracle_u05-01 oracle_u05  ENABLED  ACTIVE   30723840 CONCAT -      RW
      sd oracle01-04  oracle_u05-01 oracle01 266273280 30723840 0    <strong>c2t2d0</strong> ENA
      登入後複製

      Make sure the database files are properly laid out to avoid hot spots. Monitor I/O activities using operating system commands such as iostat and sar. Pay attention to disk queue length, disk service time, and I/O throughput. If a device is particularly busy, then consider relocating some of the data files that are on the device. On the Solaris operating system, you can get I/O statistics on controllers and devices with the iostat –dxnC command. However, hot spots tuning is easier said than done. You need to know how the application uses I/O. Furthermore, if the application is immature and new functionalities are constantly being added, the hot spots may be moving targets. DBAs are normally not apprised of new developments and often have to discover them reactively. This is why I/O balancing can be a never ending task. If you can upgrade to Oracle Database 10g, ASM (Automatic Storage Management) can help with I/O balancing.

      By the way, in addition to the systemwide db file sequential read average wait time from the V$SYSTEM_EVENT view, Oracle also provides single-block read statistics for every database file in the V$FILESTAT view. The file-level single-block average wait time can be calculated by dividing the SINGLEBLKRDTIM with the SINGLEBLKRDS, as shown next. (The SINGLEBLKRDTIM is in centiseconds.) You can quickly discover which files have unacceptable average wait times and begin to investigate the mount points or devices and ensure that they are exclusive to the database.

      select a.file#, 
             b.file_name, 
             a.singleblkrds, 
             a.singleblkrdtim, 
             a.singleblkrdtim/a.singleblkrds average_wait
      from   v$filestat a, dba_data_files b 
      where  a.file# = b.file_id   
      and    a.singleblkrds > 0
      order by average_wait;
      
      
      FILE# FILE_NAME                     SINGLEBLKRDS SINGLEBLKRDTIM AVERAGE_WAIT
      ----- ----------------------------- ------------ -------------- ------------ 
        367 /dev/vgEMCp113/rPOM1P_4G_039          5578            427   .076550735
        368 /dev/vgEMCp113/rPOM1P_4G_040          5025            416    .08278607
        369 /dev/vgEMCp113/rPOM1P_4G_041         13793           1313   .095193214
        370 /dev/vgEMCp113/rPOM1P_4G_042          6232            625   .100288832
        371 /dev/vgEMCp113/rPOM1P_4G_043          4663            482   .103366931
        372 /dev/vgEMCp108/rPOM1P_8G_011        164828         102798   .623668309
        373 /dev/vgEMCp108/rPOM1P_8G_012        193071         125573    .65039804
        374 /dev/vgEMCp108/rPOM1P_8G_013        184799         126720   .685717996
        375 /dev/vgEMCp108/rPOM1P_8G_014        175565         125969   .717506337
      登入後複製

      Team LiB Previous Section Next Section
本網站聲明
本文內容由網友自願投稿,版權歸原作者所有。本站不承擔相應的法律責任。如發現涉嫌抄襲或侵權的內容,請聯絡admin@php.cn

熱AI工具

Undresser.AI Undress

Undresser.AI Undress

人工智慧驅動的應用程序,用於創建逼真的裸體照片

AI Clothes Remover

AI Clothes Remover

用於從照片中去除衣服的線上人工智慧工具。

Undress AI Tool

Undress AI Tool

免費脫衣圖片

Clothoff.io

Clothoff.io

AI脫衣器

Video Face Swap

Video Face Swap

使用我們完全免費的人工智慧換臉工具,輕鬆在任何影片中換臉!

熱門文章

<🎜>:泡泡膠模擬器無窮大 - 如何獲取和使用皇家鑰匙
3 週前 By 尊渡假赌尊渡假赌尊渡假赌
北端:融合系統,解釋
3 週前 By 尊渡假赌尊渡假赌尊渡假赌
Mandragora:巫婆樹的耳語 - 如何解鎖抓鉤
3 週前 By 尊渡假赌尊渡假赌尊渡假赌

熱工具

記事本++7.3.1

記事本++7.3.1

好用且免費的程式碼編輯器

SublimeText3漢化版

SublimeText3漢化版

中文版,非常好用

禪工作室 13.0.1

禪工作室 13.0.1

強大的PHP整合開發環境

Dreamweaver CS6

Dreamweaver CS6

視覺化網頁開發工具

SublimeText3 Mac版

SublimeText3 Mac版

神級程式碼編輯軟體(SublimeText3)

熱門話題

Java教學
1666
14
CakePHP 教程
1425
52
Laravel 教程
1325
25
PHP教程
1272
29
C# 教程
1252
24
PHP非同步發送郵件:避免長時間等待郵件發送完成。 PHP非同步發送郵件:避免長時間等待郵件發送完成。 Sep 19, 2023 am 09:10 AM

PHP非同步發送郵件:避免長時間等待郵件發送完成。導言:在Web開發中,發送郵件是常見的功能之一。但是,由於郵件發送需要與伺服器進行通信,往往會導致用戶在等待郵件發送完成的過程中出現長時間的等待。為了解決這個問題,我們可以使用PHP非同步發送郵件的方式來優化使用者體驗。本文將介紹如何透過具體的程式碼範例實現PHP非同步發送郵件,並避免長時間的等待。一、理解異步發送郵件

事件 ID 4660:已刪除物件 [修復] 事件 ID 4660:已刪除物件 [修復] Jul 03, 2023 am 08:13 AM

我們的一些讀者遇到了事件ID4660。他們通常不確定該怎麼做,所以我們在本指南中解釋。刪除物件時通常會記錄事件ID4660,因此我們還將探索一些實用的方法在您的電腦上修復它。什麼是事件ID4660?事件ID4660與活動目錄中的物件相關,將由下列任一因素觸發:物件刪除–每當從ActiveDirectory中刪除物件時,都會記錄事件ID為4660的安全事件。手動變更–當使用者或管理員手動變更物件的權限時,可能會產生事件ID4660。變更權限設定、修改存取等級或新增或刪除人員或群組時,可能會發生這種情

總結Linux系統中system()函數的用法 總結Linux系統中system()函數的用法 Feb 23, 2024 pm 06:45 PM

Linux下system()函數的總結在Linux系統中,system()函數是一個非常常用的函數,它可以用來執行命令列指令。本文將對system()函數進行詳細的介紹,並提供一些特定的程式碼範例。一、system()函數的基本用法system()函數的聲明如下:intsystem(constchar*command);其中,command參數是一個字符

在iPhone鎖定畫面上取得即將到來的日曆事件 在iPhone鎖定畫面上取得即將到來的日曆事件 Dec 01, 2023 pm 02:21 PM

在運行iOS16或更高版本的iPhone上,您可以直接在鎖定畫面上顯示即將到來的日曆事件。繼續閱讀以了解它是如何完成的。由於錶盤複雜功能,許多AppleWatch用戶習慣能夠看一眼手腕來查看下一個即將到來的日曆事件。隨著iOS16和鎖定螢幕小部件的出現,您可以直接在iPhone上查看相同的日曆事件訊息,甚至無需解鎖設備。日曆鎖定螢幕小元件有兩種風格,可讓您追蹤下一個即將發生的事件的時間,或使用更大的小元件來顯示事件名稱及其時間。若要開始新增小元件,請使用面容ID或觸控ID解鎖iPhone,長按

在JavaScript中,'oninput'事件的用途是什麼? 在JavaScript中,'oninput'事件的用途是什麼? Aug 26, 2023 pm 03:17 PM

當輸入框中新增值時,就會發生oninput事件。您可以嘗試執行以下程式碼來了解如何在JavaScript中實現oninput事件-範例<!DOCTYPEhtml><html>  <body>   <p>Writebelow:</p>   <inputtype="text&quot

jquery中常用的事件有哪些 jquery中常用的事件有哪些 Jan 03, 2023 pm 06:13 PM

jquery中常用的事件有:1、window事件;2、滑鼠事件,是當使用者在文件上方移動或點選滑鼠時而產生的事件,包括滑鼠點選、移入事件、移出事件等;3、鍵盤事件,是使用者每次按下或釋放鍵盤上的按鍵時都會產生事件,包括按下按鍵事件、釋放按鍵按鍵等;4、表單事件,例如當元素獲得焦點時會觸發focus()事件,失去焦點時會觸發blur()事件,表單提交時會觸發submit()事件。

jQuery中如何實作select元素的改變事件綁定 jQuery中如何實作select元素的改變事件綁定 Feb 23, 2024 pm 01:12 PM

jQuery是一個受歡迎的JavaScript函式庫,可以用來簡化DOM操作、事件處理、動畫效果等。在web開發中,常常會遇到需要對select元素進行改變事件綁定的情況。本文將介紹如何使用jQuery實作對select元素改變事件的綁定,並提供具體的程式碼範例。首先,我們需要使用標籤來建立一個包含選項的下拉式選單:

如何在PHP專案中實現日曆功能和事件提醒? 如何在PHP專案中實現日曆功能和事件提醒? Nov 02, 2023 pm 12:48 PM

如何在PHP專案中實現日曆功能和事件提醒?在開發Web應用程式時,行事曆功能和事件提醒是常見的需求之一。無論是個人日程管理、團隊協作,或是線上活動安排,行事曆功能都可以提供便利的時間管理和事務安排。在PHP專案中實現日曆功能和事件提醒可以透過以下步驟來完成。資料庫設計首先,需要設計資料庫表來儲存日曆事件的相關資訊。一個簡單的設計可以包含以下欄位:id:事件的唯一

See all articles