我终于拼凑了一些代码,适用于我的问题here。然而,它看起来相当长,因为我创建了具有特定散列的页面刷新时的单独函数,以及何时通过单击标签访问了相同的页面。 $(document).ready(function() {
$(function() {
var loc = window.location.href; // For when Hazel is refreshed
select model from (
select price, model from pc where price = (select max(price) from pc)
union
select price, model from laptop where price = (select max(price) from laptop)
union