\hfill\break 【分析】\\ 先求出集合$B$，再依据并集的定义求并集.\\ 【详解】\\ $B=\left {x\left\textbar{} x^{2}-2x-3\leq 0\right.\right }=\left {x\left\textbar{} -1\leq x\leq 3\right.\right }$，又$A=\left {x\left\textbar{} x\textless{} 2\right.\right }$，\\ 所以$A\cup B=\left(-\mathrm{\infty }\mathrm{，}3\right]$\\ 故选：D 
已知集合$A=\left {x\left\textbar{} x\textless{} 2\right.\right }$，$B=\left {x\left\textbar{} x^{2}-2x-3\leq 0\right.\right }$，则$A\cup B=$（~~~~~~~）

A. $\left[-1,2\right)$ 
B. $\left(2,3\right]$ 
C. $\left(-1,3\right]$ 
D. $\left(-\mathrm{\infty },3\right]$ 