gpt4 book ai didi

php - 根据查询字符串选择单选选项

转载 作者:行者123 更新时间:2023-11-30 18:03:07 24 4
gpt4 key购买 nike

我在选择与查询字符串相关的单选选项时遇到了一些问题。我有以下代码......

<?php if ( $_GET['fp'] == 'floorplanfive' ) { ?>
<script type="text/javascript">
jQuery('#choice_2_4').attr('checked', 'checked');
console.log("test");
</script>
<?php } ?>

控制台显示“测试”消息,但未选择单选选项。

页面可以是found here.

请帮忙。 :-)

最佳答案

您需要将代码放入 $(document).ready() 函数中:

jQuery(document).ready(function() {
// your code
});

关于php - 根据查询字符串选择单选选项,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16440521/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com