FYI I’ve now found https://codex.www.ads-software.com/Using_Javascript which offers some helpful suggestions about exactly this issue. The Yahoo based search box on WordPress’s site couldn’t find this though. Google picked it right up without even a site search.