易优CMS搜索必填代码
2019-10-16 16:12:00
ADMIN
{eyou:searchform type='default'} <form method="get" action="{$field.action}" onsubmit="return searchForm();"> {$field.hidden} <input type="text" name="keywords" id="keywords" placeholder="请输入关键字"> <input type="submit" value="搜索"> </form><script>function searchForm(){var keywords = document.getElementById('keywords').value;if (keywords == '') {alert('请输入关键字');return false;}return true;}</script> {/eyou:searchform}