Chrome: Uncaught TypeError: Cannot read property 'replace' of undefined
问题 I am trying to write a code to auto select a radio button: <input type="radio" class="pricezone-radio-input" name="abcdef" value="123" checked="" title="A"> Since the name of the radio button changes every time when the website refresh, so I used the title instead var $ = window.jQuery; (function() { 'use strict'; // Your code here... $("[A']").click(); })(); When I look at the console in chrome, after the code run, an error occur: common.js?version=1552060637712:1175 Uncaught TypeError: