定义,单选按钮更改为带循环自动下拉
我正在寻求帮助...并希望您好意
我想使用循环将我的网站语言模型从单选按钮更改为自动下拉按钮
这是语言
if ($lang=="en") {
//Pages
define ("Pages", "Pages") ;
}
if ($lang=="de") {
define ("Pages", "Seiten") ;
}
这是现有的单选按钮
<td width="60%">Languange<b><BR />
<?php
if ($lang == 'en') {
print '<input type="radio" value="de" checked name="lang_" /> German  
<input type="radio" value="en" name="lang_" />English ';
}
else {
print '<input type="radio" value="de" name="lang_" />German  
<input type="radio" value="en" checked name="lang_" />English ';
}
?>
</b></td>
和上面的单选按钮我想更改下拉按钮,我需要你的帮助
i looking for help... and hope of you kindly
I want to change my site language model from radio button to auto dropdown button using loop
This the languages
if ($lang=="en") {
//Pages
define ("Pages", "Pages") ;
}
if ($lang=="de") {
define ("Pages", "Seiten") ;
}
This the existing Radio button
<td width="60%">Languange<b><BR />
<?php
if ($lang == 'en') {
print '<input type="radio" value="de" checked name="lang_" /> German  
<input type="radio" value="en" name="lang_" />English ';
}
else {
print '<input type="radio" value="de" name="lang_" />German  
<input type="radio" value="en" checked name="lang_" />English ';
}
?>
</b></td>
and the Radio button above i want to change drop down button, i looking your help please
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
我很难理解你的问题,但你想做这样的事情吗? (我还没有测试过这段代码)
I am struggling to understand your question, but are you looking to do something like this? (I haven't tested this code yet)
在 PHP 中,如果不刷新页面就无法执行此操作。否则,您可以使用 JavaScript 来检测单选按钮何时被单击,然后相应地更改下拉列表。
you can't do this in PHP without refreshing the page. otherwise, you can use JavaScript to detect when the radio buttons are clicked, and then change the drop down appropriately.
我曾经见过这样的代码,我想要,
但我是 php 新手。
I ever seen like this code, that i want to
but i am new to php..