如何将$ this(self关键字)传递给Jquery中的函数
$(document).ready(function() {
$('.nav a').click(function() {
var direction = $(this).attr("name");
submit_form($(this))
});
function submit_form(this)
{
// do some stuff with 'this'
}
});
Run Code Online (Sandbox Code Playgroud) 你如何测试会议是否开启.这不是......
session_start();
if(isset($_SESSION)) {
echo "sessions ON<br>";
}
else{
echo "sessions OFF<br>";
}
session_destroy();
if(isset($_SESSION)) {
echo "sessions ON<br>";
}
else{
echo "sessions OFF<br>";
}
Run Code Online (Sandbox Code Playgroud) PHP中是否有函数或类可以传递MySQL记录集,并且我返回一个JSON字符串,可以传递回Ajax请求中的JavaScript函数?
这样的事情:
function recordSetToJson($recordset) {
while($rs1 = mysql_fetch_row($recordset)) {
for($count = 0; $count < count($rs1); $count++) {
// read and add field to JSON
}
$count++;
}
return $jasonstring
}
Run Code Online (Sandbox Code Playgroud)