PHP在选择标签中单击选项可单击的链接
我正在尝试在“选择标签可单击的链接”中进行选项,但是在浏览器重定向到它从MySQL数组中获得的第一个值之前,我无法单击任何内容。
<select name="recipient" class="form-select form-select-lg mb-3"id="choice" onchange="location.href=this.value">
<?php
foreach($all_users as $user):
?>
<option selected='' value="<?=$user['id']; ?>"><?= $user['firstname'] . ' ' . $user['lastname']; ?>
</option>
<?php endforeach; ?>
</select>
I'm trying to make the options in the select tag clickable links, but I'm not able to click anything before the browser redirects to the first value it gets from the mysql array.
<select name="recipient" class="form-select form-select-lg mb-3"id="choice" onchange="location.href=this.value">
<?php
foreach($all_users as $user):
?>
<option selected='' value="<?=$user['id']; ?>"><?= $user['firstname'] . ' ' . $user['lastname']; ?>
</option>
<?php endforeach; ?>
</select>
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我不确定,您的问题到底是什么,但是请尝试我的代码,希望您会得到一些东西
I am not sure, what is your question exactly, but try my code hopefully you will get something