我写了一些jQuery代码,这是它的一部分.这总是返回UNDEFINED.这是为什么
<html>
<head>
<script src="theme/js/jquery.min.js"></script>
<script type="text/javascript">
$(document).ready(function() {
$("#my").click(function() {
alert($("#adults").val());
});
});
</script>
</head>
<body>
<form>
<a href="#" id="my">click</a>
<select class="text" id="currency" id="adults">
<option value="1" selected="selected">1</option>
<option value="2" >2</option>
<option value="3" >3</option>
<option value="4" >4</option>
</select>
</form>
</body>
</html>
Run Code Online (Sandbox Code Playgroud)
这用于了解有多少成年人.没有它就无法运行.
我想使用c#服务阻止来自用户的某些文件夹.这意味着当您启动服务时,虽然它被阻止,但最终结果是阻止文件夹.我写了一个代码.但你的回答是肯定的吗?请帮忙解决这个问题
string Pathname = folder;
EventLog.WriteEntry(Pathname);
string Username = @"BUILTIN\Users";
string UserRights = "N";
if (Pathname == null || Pathname == "")
{
EventLog.WriteEntry("No File");
}
string CommandLine = '"' + System.IO.Path.GetFullPath(Pathname) + '"' + " /C ";
CommandLine += @" /T ";
CommandLine += @" /P " + Username + ":" + UserRights;
Process p = new Process();
p.StartInfo.FileName = "cacls.exe";
p.StartInfo.Arguments = CommandLine;
p.StartInfo.RedirectStandardOutput = true;
p.StartInfo.RedirectStandardInput = true;
p.StartInfo.UseShellExecute = false;
p.StartInfo.WindowStyle = …Run Code Online (Sandbox Code Playgroud)