Oscillatory flow has many applications in micro-scaled devices. The methods of realizing microfluidic oscillators reported so far are typically based on the impinging-jet and Coanda effect, which usually require the flow Reynolds number to be at least at the order of unity. Another approach is to introduce elastomeric membrane into the microfluidic units; however, the manufacturing process is relatively complex, and the membrane will become soft after long-time operation, which leads to deviation from the design condition. From the perspective of the core requirement of a microfluidic circuit, i.e., nonlinearity, the oscillatory microfluidic flow can be realized via the nonlinear characteristics of viscoelastic fluid flow. In this paper, the flow characteristics of viscoelastic fluid (Boger-type) in a T-shaped channel and its modified structures are studied by two-dimensional direct numerical simulation (DNS). The main results obtained from the DNS study are as follows: (1) Both Weissenberg (Wi) number and viscosity ratio need to be within a certain range to achieve a periodic oscillating performance; (2) With the presence of the dynamic evolution of the pair of vortices in the upstream near the intersection, the oscillation intensity increases as the elasticity-dominated area in the junction enlarges; (3) Considering the simplicity of the T-type channel as a potential oscillator, the improved structure should have a groove carved toward the entrance near the upper wall. The maximum oscillation intensity measured by the standard deviation of flow rate at outlet is increased by 129% compared with that of the original standard T-shaped channel under the same condition. To sum up, with Wi number and viscosity ratio within a certain range, the regular periodic oscillation characteristics of Oldroyd-B type viscoelastic fluid flow in standard T-shaped and its modified channels can be obtained. This structure can serve as a passive microfluidic oscillator with great potential value at an extremely low Reynolds number, which has the advantages of simplicity, no moving parts and fan-out of two.