如何在PHP中自动建议文本框 [英] How to make auto suggest textbox in PHP

查看:58
本文介绍了如何在PHP中自动建议文本框的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Hello Guys,现在正在php网站上工作,在这个网站上,我有一个文本框,我想让这个文本框auto1suggest。

伙计们请看我的代码并建议我怎么能这样做。

谢谢。



我尝试过:



Hello Guys, Nowadays am working on php site and in this site, i have a textbox and I want to make this text box auto1suggest.
guys please see my code and suggest me how can i do it.
Thanks.

What I have tried:

// keywords
				if( empty($fields) || in_array('keywords', $fields) ){
					$ret .= '<div class="tourmaster-tour-search-field tourmaster-tour-search-field-location" >';
					$ret .= '<label>' . esc_html__('Enter Your_Location', 'tourmaster') . '</label>';
					$ret .= '<div class="tourmaster-tour-search-field-inner" >';
					$ret .= '<input name="tour-search" type="text" value="' . (empty($_GET['tour-search'])? '': esc_attr($_GET['tour-search'])) . '" />';
					$ret .= '</div>';
					$ret .= '</div>';
				}else{
					$ret .= '<input name="tour-search" type="hidden" value="" />';
				}

推荐答案

fields)|| in_array('keywords',
fields) || in_array('keywords',


fields)){


ret。='< div class =tourmaster-tour-search-field tourmaster -tour-search-field-location>';
ret .= '<div class="tourmaster-tour-search-field tourmaster-tour-search-field-location" >';


这篇关于如何在PHP中自动建议文本框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆