为了账号安全,请及时绑定邮箱和手机立即绑定

在不破坏我的代码的情况下删除函数

在不破坏我的代码的情况下删除函数

三国纷争 2021-05-16 12:05:01
我正在尝试在我的Web应用程序中实现站点搜索功能,但是我想删除多余的单选按钮输入。原始代码使您可以使用三个单选按钮来选择搜索引擎。我删除了三个按钮,但是我不知道如何删除最后一个按钮。我只想默认使用google。// All-in-one Internal Site Search script- By JavaScriptKit.com (http://www.javascriptkit.com)// For this and over 400+ free scripts, visit JavaScript Kit- http://www.javascriptkit.com/// This notice must stay intact for use//Enter domain of site to search.var domainroot = "ts.xxxxxxx.net"var searchaction = [ //form action for the 3 search engines  "http://www.google.com/search"]var queryfieldname = ["q", "p", "q"] //name of hidden query form for the 3 search enginesfunction switchaction(cur, index) {  cur.form.action = searchaction[index]  document.getElementById("hiddenquery").name = queryfieldname[index]}function jksitesearch(curobj) {  for (i = 0; i < document.jksearch.se.length; i++) { //loop through radio to see which is checked    if (document.jksearch.se[i].checked == true)      switchaction(document.jksearch.se[i], i)  }  document.getElementById("hiddenquery").value = "site:" + domainroot + " " + curobj.qfront.value}<form name="jksearch" action="http://www.google.com/search" method="get" onSubmit="jksitesearch(this)">  <input id="hiddenquery" type="hidden" name="q" />  <input name="qfront" type="text" style="width: 200px" value="" /> <input type="submit" value="Search" /><br />  <div style="font: bold 11px Verdana;"><input name="se" type="radio" checked>  </div></form>
查看完整描述

2 回答

  • 2 回答
  • 0 关注
  • 115 浏览
慕课专栏
更多

添加回答

举报

0/150
提交
取消
意见反馈 帮助中心 APP下载
官方微信