小编lan*_*tha的帖子

$('#select').val()返回UNDEFINED

我写了一些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)

这用于了解有多少成年人.没有它就无法运行.

javascript jquery

2
推荐指数
1
解决办法
5991
查看次数

如何在c#windows服务中使用CACLS

我想使用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)

.net c# service cacls c#-2.0

1
推荐指数
1
解决办法
2604
查看次数

标签 统计

.net ×1

c# ×1

c#-2.0 ×1

cacls ×1

javascript ×1

jquery ×1

service ×1