0

我希望能够自动选择标题为“搜索书籍”的选项卡并在带有 id 的结果中显示结果。这应该在提交带有 id endesa 的表单后发生。

这是我的代码:

<html>
<link rel="stylesheet" type="text/css" href="../../themes/default/easyui.css">
<link rel="stylesheet" type="text/css" href="../../themes/icon.css">
<link rel="stylesheet" type="text/css" href="../demo.css">
<script type="text/javascript" src="../../jquery.min.js"></script>
<script type="text/javascript" src="../../jquery.easyui.min.js"></script>
<body>
<div class="easyui-tabs" style="width:700px;height:250px">
<div title="About" style="padding:10px">
<p style="font-size:14px">
jQuery EasyUI framework help you build your web page easily.  
</p>contesnts
</div>
<div title="Search For Books" style="padding:10px">
<form action="mysql.php" method="post" id="endesa">
<input type="text" name="search" id="search"/>&nbsp;&nbsp;
<input type="button" name="button" value="Search"/>
</form>
<div id="results"></div>
</div>
<div title="Help" data-options="iconCls:'icon-help',closable:true" style="padding:10px">
his is the help content.
</div>
</div></body>
4

1 回答 1

0

您可以简单地将autofocus属性添加到输入中。

<input id="search" type="text" autofocus>

演示

于 2013-10-25T12:34:06.327 回答