我做到了:
/^(http[s]?://){0,1}(www.){0,1}[a-zA-Z0-9\.\-]+\.[a-zA-Z]{2,5}[\.]{0,1}
Run Code Online (Sandbox Code Playgroud)
并使用验证器检查它,但在我的页面上它不起作用:
var re = /^(http[s]?://){0,1}(www.){0,1}[a-zA-Z0-9\.\-]+\.[a-zA-Z]{2,5}[\.]{0,1};
if (!re.test(url)) {
alert("url error");
return false;
}
Run Code Online (Sandbox Code Playgroud)
我收到这个错误
Webpage error details
User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C; .NET4.0E)
Timestamp: Tue, 30 Nov 2010 14:23:10 UTC
Message: Expected ')' in regular expression
Line: 781
Char: 23
Code: 0
URI: http://*************************
Run Code Online (Sandbox Code Playgroud) 我有一个包含多列的表,但我只需要 2 列。
select id, department from tbl
Run Code Online (Sandbox Code Playgroud)
如果我想使用distinct,我该怎么做?这是行不通的:
select id, distinct department from tbl
Run Code Online (Sandbox Code Playgroud) 假设我创建一个对象:
set newcon = Server.CreateObject("ADODB.Connection")
Run Code Online (Sandbox Code Playgroud)
在某个时候我摧毁了它:
set newcon = nothing
Run Code Online (Sandbox Code Playgroud)
我如何判断它newcon是一个物体还是什么都没有?
我努力了:
newcon is nothing
Run Code Online (Sandbox Code Playgroud)
但我明白了object required。
如果我尝试isobjector isnullorisempty它不会返回trueor false。
还有其他真正有效的东西吗?
这是我表格中支票的一部分
function check(theform) {
var re = /^\w[0-9A-Za-z]{5,19}$/;
if (!re.test(theform.username.value)) {
alert("not valid username");
theform.username.focus();
return false;
}
$.ajax({
type: "POST",
url: "username.asp",
data: "username="+theform.username.value,
success: function(msg){
username = msg;
if (!username) {
alert("username already in use");
return false;
}
}
});
var re = /^\w[0-9A-Za-z]{5,19}$/;
if (!re.test(theform.password.value)) {
alert("not valid password");
theform.password.focus();
return false;
}
}
Run Code Online (Sandbox Code Playgroud)
出于某种原因进行同步...它检查用户名,然后用ajax复制用户名,而不是等待响应并跳转到密码检查.
我不想插入代码的其余部分isreadystate(或者是什么都),因为我可能会移动的用户名重复检查结束......然后该函数将前阿贾克斯结束反正
我该怎么办?
我有这个HTML:
<table style="width: 128px;" border="0" cellspacing="0" cellpadding="0">
<colgroup span="1"><col span="2" width="64"></col></colgroup>
<tbody>
<tr height="20">
<td width="64" height="20"> </td>
<td class="xl65" dir="rtl" width="64"><strong></strong></td>
</tr>
<tr height="20">
<td class="xl67" dir="rtl" width="64" height="20"> </td>
<td class="xl66" dir="ltr" width="64">T3500 </td>
</tr>
<tr height="20">
<td class="xl68" width="64" height="20"> </td>
<td> </td>
</tr>
<tr height="20">
<td height="20"> </td>
<td class="xl65" dir="rtl" width="64"><strong></strong></td>
</tr>
<tr height="48">
<td class="xl67" dir="rtl" width="64" height="48"> </td>
<td class="xl66" dir="ltr" width="64">Intel® X58 Chipset </td>
</tr>
<tr height="33">
<td class="xl70" dir="rtl" width="64" height="33"> </td>
<td class="xl69" dir="ltr" width="64">10/100/1000 </td>
</tr>
<tr height="20">
<td …Run Code Online (Sandbox Code Playgroud) 这是我的连接
strCon="DBQ=" & Server.Mappath("db.mdb") & ";Driver={Microsoft Access Driver (*.mdb)};PWD=password;"
set adoCon=server.createobject("adodb.connection")
adoCon.Open strCon
Run Code Online (Sandbox Code Playgroud)
因此,为了使用 2 个数据库,我有 2 个 adoCon,当我进行选择时,我会从我需要的每个数据库中进行选择
现在的问题......在这种情况下,我将只能从一个然后从另一个获取所有信息。但我想要的是能够把它们放在一起。
db1.tblcats 有类别,db2.tblcats 有类别和子类别,所以除了能够同时选择两者之外,我还需要能够知道什么是 db 中的 cat
大帮助后的第2步
这是我的代码
strSQL = "SELECT name FROM tblcats union " _
& "select name from [MS Access;PWD=pass;DATABASE=" & Server.Mappath("../shop.mdb") & "].tblcats as bcats where bcats.father=50"
rs.CursorType = 3
rs.LockType = 3
rs.Open strSQL, strCon
while not rs.eof
response.write rs("name")&"<br>"
rs.movenext
wend
Run Code Online (Sandbox Code Playgroud)
我怎么知道什么记录来自什么数据库?因为我需要为每个人采取不同的行动
我有
$("#sendbid").live("click", function() {
//here will be the ajax
//after success:
$("#personaltab").empty();
})
Run Code Online (Sandbox Code Playgroud)
personaltab在原始代码中.内容是在ajax上创建的,然后当用户继续时我想用live检查并清空div
不工作 - 我已经尝试过了!