小编cla*_*oda的帖子

具有相同名称的多个单选按钮组

我已经传递了一个动态创建HTML的复杂应用程序.

问题是,前一个人不知道单选按钮的"名称"属性实际上是组关联.

有了以下标记,有没有办法把它们分成两组

<div>
  <%-- would like this to be a seperate group without changing name--%>
  <label class="radio-inline"><input type="radio" name="radio" value="1">Group 1 Option 1</label>
  <label class="radio-inline"><input type="radio" name="radio" value="2">Group 1 Option 2</label>
  <label class="radio-inline"><input type="radio" name="radio" value="3">Group 1 Option 3</label>
</div>

<div>
  <%-- would like this to be a seperate group without changing name--%>
  <label class="radio-inline"><input type="radio" name="radio" value="1">Group 2 Option 1</label>
  <label class="radio-inline"><input type="radio" name="radio" value="2">Group 2 Option 2</label>
  <label class="radio-inline"><input type="radio" name="radio" value="3">Group 2 Option 3</label>
</div>
Run Code Online (Sandbox Code Playgroud)

是否有任何div或任何我可以围绕他们分开分组?我尝试了字段集和图例但它没有效果.我知道我可以将每个人放在一个表格中,但之后他们不会全部提交.

html javascript radio-button

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

Bing地图多边形搜索不准确

我在这里找到的bing maps示例Polygon Search遇到了一些问题:

多边形搜索大约是此链接的一半.

  public bool polygonSearch(LocationCollection points, double lat, double lon)
{
    MapPolygon poly = new MapPolygon();

    int i = 0;
    int j = points.Count - 1;
    bool inPoly = false;

    for (i = 0; i < points.Count; i++)
    {
        if (points[i].Longitude < lon && points[j].Longitude >= lon || points[j].Longitude < lon && points[i].Longitude >= lon)
        {
            if (points[i].Latitude + (lon - points[i].Longitude) / (points[j].Longitude - points[i].Longitude) * (points[j].Latitude - points[i].Latitude) < lat)
            {
                inPoly = !inPoly;

            }
        } …
Run Code Online (Sandbox Code Playgroud)

c# wpf bing-maps bing-api

7
推荐指数
2
解决办法
1691
查看次数

Web辅助功能测试工具

我想知道是否有人知道任何用于Web可访问性测试的免费(几乎免费)应用程序.

到目前为止,我发现了;

  1. WAT - Web辅助功能工具栏
  2. http://achecker.ca/checker/index.php
  3. http://fae.cita.uiuc.edu/
  4. 火眼睛

谢谢!

testing accessibility semantic-markup blind

6
推荐指数
2
解决办法
3087
查看次数

在App Store上使用Apache Cordova MS VS Extension保护应用程序

只是对在Windows应用商店,Andriod商店和Apple Store上传的应用有疑问.我之前从未为这三家商店中的任何一家构建应用程序,但Visual Studio的Multi Hybrid Extension似乎是覆盖所有三个平台的一个很好的开端.

如何保护上传到三家商店的应用程序的代码?Apache Cordova扩展的核心开发是在HTML5和Javascript中完成的.在常规的HTML/Javascript网站上,最终用户只需右键单击并查看页面的源代码,然后查看我编写的所有代码.

我的问题是,对于上传到应用商店的应用,这如何受到保护?有人能够对我的应用程序进行逆向工程并获取代码并简单地重新销售吗?

谢谢大家的时间

javascript html5 app-store cordova windows-store-apps

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

在按钮ASP.NET c#上禁用回发

这是我正在做的一个例子

Page Load
{
   //Adds items to a panel (not an updatepanel just a normal panel control)
}

 protected void btnNexMod_Click(object sender, EventArgs e)
{

   // Calls DoWork() and Appends more items to the same panel
}
Run Code Online (Sandbox Code Playgroud)

我的问题是asp:按钮正在进行回发以及调用 DoWork()

因此,重新调用我的页面加载,重新初始化我的面板:(

我希望我添加到面板中的项目留在那里!

所有的帮助表示赞赏,而不是寻找你的答案.任何步骤都表示赞赏谢谢!

这是我的问题的一个确切示例.

protected void Page_Load(object sender, EventArgs e)
{

    CheckBox chkbox = new CheckBox();
    chkbox.Text = "hey";
    chkbox.ID = "chk" + "hey";

    // Add our checkbox to the panel
    Panel1.Controls.Add(chkbox);
}
protected void Button1_Click(object sender, EventArgs e)
{
    CheckBox …
Run Code Online (Sandbox Code Playgroud)

c# asp.net

5
推荐指数
1
解决办法
7万
查看次数

防止muieblackcat BOT

今天早上我注意到我们的IIS日志中有一些奇怪的记录来自;

  • 193.169.40.39 - 与PHP页面相关联(2012-12-15 05:34:24 EST)

  • 121.14.73.8 - 与PHP页面相关联(2012-12-15 23:11:42 EST)

  • 167.206.74.237 - 与wordpress页面相关(2012-12-16 22:38:37 EST)

  • 178.15.152.69 - 与wordpress页面相关联(2012-12-17 12:11:00 EST)

这是令人担忧的,因为我们不托管PHP/wordpress页面.

谷歌搜索会让我相信muieblackcat是一个试图利用PHP漏洞的网络机器人.

我安全,因为我们没有托管PHP环境? 我曾想过阻止IP,但是再一次,机器人更可能使用某种代理来完成它的肮脏工作.

word-press PHP文件请求的可能性多于同一个机器人?也许遇到muieblackcat的人会识别出按字的请求.请参阅下面的IIS记录.

关于ASP.NET IIS 7托管,是否有更多有经验的防御机制/预防措施可以发挥作用?

例:

奇怪的PHP条目

2012-12-15 05:34:24/muieblackcat - 193.169.40.39 - 1424 140 224
2012-12-15 05:34:24 /index.php - 193.169.40.39 - 1424 138 5
2012-12-15 05:34 :24 /admin/index.php - 193.169.40.39 - 1424 144 5
2012-12-15 05:34:24 /admin/pma/index.php - 193.169.40.39 - 1424 148 3
2012-12-15 05:34 :24 /admin/phpmyadmin/index.php - 193.169.40.39 - 1424 155 …

asp.net iis bots

5
推荐指数
2
解决办法
8287
查看次数

鼠标事件发送方如何为空?(仅限Windows 8.1+ TOUCH)

这仅发生在Windows 8.1+触摸设备上.我有一些面板,用户可以用手指滑动.我已经实现了PreFilterMessage,这样我就可以在整个应用程序中捕获鼠标移动,而不必担心子控件的干扰.

单击触摸设备上的表单时,有时会收到一般错误:

IsCanceledMove() Object reference not set to an instance of an object.
Run Code Online (Sandbox Code Playgroud)

我在没有工具栏或工具条的空白表格中进行测试.只有两个面板.一个有大标签,另一个有按钮和文本框.这是我的鼠标移动过滤器,我将传递事件的发送者传递给引发异常的函数.

private static void mouseFilter_MouseFilterMove(object sender, MouseFilterEventArgs e)
{
     IsCanceledMove(sender as Control);
}

public bool PreFilterMessage(ref Message m)
{
      Point mousePosition = Control.MousePosition;
      var args = new MouseFilterEventArgs(MouseButtons.Left, 0, mousePosition.X, mousePosition.Y, 0);

      switch (m.Msg)
      {
          case WM_MOUSEMOVE:
              if (MouseFilterMove != null)
                     MouseFilterMove(Control.FromHandle(m.HWnd), args);
              break;

            // more cases
      }

        // Always allow message to continue to the next filter control
        return args.Handled;
}
Run Code Online (Sandbox Code Playgroud)

接下来我只是检查被移动的控件是否是文本框,以及是否正在突出显示文本.我还检查了另一个公共类的静态布尔变量.如果其中任何一个为真,我设置LastTouchedPanel …

c# event-handling mouseevent touch winforms

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

在 Asp.net Web.Config 中使用“Service-Worker-Allowed”(PWA 顶部不需要的 URL)

我有以下网站托管两个 PWA。

www.xy.com/z
Run Code Online (Sandbox Code Playgroud)

我的PWA A托管在

www.xy.com/z/a
Run Code Online (Sandbox Code Playgroud)

PWA B托管于

www.xy.com/z/b
Run Code Online (Sandbox Code Playgroud)

我从源头为PWA A注册了一个 Service Worker,www.xy.com/z/a如下所示。

           if ('serviceWorker' in navigator) {
                navigator.serviceWorker.register('/z/a/sw.js', {scope: '/'}).then(function (registration) {
                     console.log('Service worker registration succeeded:', registration);
                }).catch(function (error) {
                    console.log('Service worker registration failed:', error);
                });
            } else {
                console.log('Service workers are not supported.');
            }
Run Code Online (Sandbox Code Playgroud)

我以同样的方式从源头为PWA B注册一个 Service Workerwww.xy.com/z/b

             if ('serviceWorker' in navigator) {
                    navigator.serviceWorker.register('/z/b/sw.js', {scope: '/'}).then(function (registration) {
                         console.log('Service worker registration succeeded:', registration);
                    }).catch(function (error) {
                        console.log('Service worker …
Run Code Online (Sandbox Code Playgroud)

javascript asp.net iis service-worker progressive-web-apps

5
推荐指数
0
解决办法
1511
查看次数

跨域 IFrame element.scrollIntoView() Safari 问题

我遇到了一个困扰整个谷歌的问题,但提供的解决方案都没有正常工作。我假设这些解决方案中的大多数都没有考虑跨域。

我有一个网站,我想指导用户将(整页)IFrame 嵌入到他们的网站中。问题仅出现在某些版本的 Safari 上。IFrame 中的元素无法将自身滚动到视图中。

在此处输入图片说明

我注意到,如果我进行相同的域测试,IFrame 可以使用window.parent.scrollTo(0,element.top). 这有效,但不能跨域。另一个奇怪的事情是没有其他浏览器需要 window.parent 方法来滚动 IFrame,只有 Safari。所有其他浏览器都可以element.scrollIntoView()在 IFrame 中使用。请注意,我已经使用JavaScript 解决方法来取悦带有跨协议 IFrame 的 Safari。

我只在 IFrame 中的 Safari Mobile 上看到的另一个问题是,当向下滚动时,Bootstrap Modals 出现在 IFrame 的顶部。尽管如此,我确信如果我们可以正确设置滚动位置,我们也应该能够设置模态位置。

这是我尝试过的;

 1. window.frames['IFrameName'].document.
    getElementById("elmId").scrollIntoView();
Run Code Online (Sandbox Code Playgroud)
  1. 偏移技巧
  2. 速度.js

我最后的手段(我认为)是在我的 IFrame 中使用 postMessage 来通知父域设置框架的滚动位置。

在我看来,这个问题已经存在了很长时间。还有比这更好的方法吗?

javascript safari iframe jquery

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

RDLC 分组改变了我的排序

我有一个简单的报告,要按日期排序。

如果我按日期排序而不分组,一切都很好。一旦我添加了我的组,数据就不再按日期排序。

我尝试在每一列上添加“日期”的交互式排序,但仍然没有成功。

我有什么遗漏的吗?这一定是可能的!

PS:我的数据是用SQL按日期排序的。

c# rdlc

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