62,046
社区成员
发帖
与我相关
我的任务
分享
function Getkeyword()
{
var url="<%=Getshiming() %>";
if(url!="")
{
alert(url);
window.open(url);
}
<input type="Button" class="btn" id="su" value="搜 索" style="margin-right:10px; float:left;" onclick="Getkeyword()">
function Getkeyword()
{
var html="<%=Getshiming() %>";
var url=html.length==0?"http://baidu.com":html;
if(url!="")
{
alert(url);
window.open(url);
}
}
public string Getshiming()
{
string url = "";
DataSet ds = Control.GetValue(SqlManager.Getshiming(keyword));
if (IsNullOrEmp(ds))
{
for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
{
url = "http://" + Convert.ToString(ds.Tables[0].Rows[i]["net_path"]);
}
}
return url;
}
这个是Getshiming()的的方法
public string Getshiming()
{
return "http://www.baidu.com";
}