我为搜索结果创建了一个表单:
<form id="searchForm" action="<?php echo JRoute::_('index.php?option=com_new');?>" method="get">
<fieldset class="word">
<label for="search-searchword">
<?php echo Word; ?>
</label>
<input type="text" name="<?php echo JRoute::_('index.php?option=com_new');?>searchword" id="search-searchword" size="30" value="<?php echo $this->escape($this->origkeyword); ?>" class="inputbox" />
<button name="Search" onclick="this.form.submit()" class="button"><?php echo Submit;?></button>
<input type="hidden" name="task" value="search" />
</fieldset>
我得到的网址是:
/index.php?%2Fsearch%2Findex.php%3Foption%3Dcom_newsearchword=&Search=&task=search