我有这个代码,我想在静态字典中存储left,top的参数值.并存储此值后,我想在Jquery中访问它们.感谢您的帮助.
我的代码
using Microsoft.AspNet.SignalR;
using Microsoft.AspNet.SignalR.Hubs;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
namespace WebApplication1.MoveShape
{
public class MoveShapeHub : Hub
{
public void calculate(string left, string top)
{
Clients.Others.updateshape(left, top);
}
}
}
Run Code Online (Sandbox Code Playgroud) 我正在使用Isotope.js制作我的项目,我必须以水平方式显示我的瓷砖,所以我遵循代码
var winDow = $(window);
// Needed variables
var $container=$('.portfolio-box, .blog-box');
var $filter=$('.filter');
try{
$container.imagesLoaded( function(){
$container.show();
$container.isotope({
layoutMode: 'masonryHorizontal',
masonryHorizontal: {
rowHeight: 50
},
});
});
} catch(err) {
}
Run Code Online (Sandbox Code Playgroud)
但不幸的是它不起作用,控制台上的错误是
1. Uncaught TypeError: Cannot read property 'LayoutMode' of undefined
2. Uncaught TypeError: undefined is not a function
Run Code Online (Sandbox Code Playgroud)
必须提供帮助
我有ajax请求将数据发送到我的控制器,它收集我的下拉列表的值
错误是
POST http://localhost:65070/form/create 500 (Internal Server Error)
Run Code Online (Sandbox Code Playgroud)
错误的反应是
The required anti-forgery form field "__RequestVerificationToken" is not present.
Run Code Online (Sandbox Code Playgroud)
更新 我的表格
@using (Html.BeginForm())
{
@Html.AntiForgeryToken()
@Html.ValidationSummary(true)
<fieldset>
<legend>Form</legend>
<div class="editor-label">
@Html.LabelFor(model => model.FormName)
</div>
<div class="editor-field">
@Html.EditorFor(model => model.FormName)
@Html.ValidationMessageFor(model => model.FormName)
</div>
<div class="editor-label">
@Html.LabelFor(model => model.MasterID, "MasterModule")
</div>
<div class="editor-field">
@Html.DropDownList("MasterID", String.Empty)
@Html.ValidationMessageFor(model => model.MasterID)
</div>
<select id="State" name="state"></select><br />
<p>
<input type="submit" value="Create" />
</p>
</fieldset>
}
Run Code Online (Sandbox Code Playgroud)
我的ajax请求
$('#State').change(function () {
var a = $('#State').val();
$.ajax({
url: "/form/create", …Run Code Online (Sandbox Code Playgroud) 
在红框中显示模块的以下状态..任何人都可以帮助我..提前致谢
我在我的项目中使用网络音频 api。有没有办法记录发送到 webkitAudioContext.destination 的音频数据?.wav 文件正在我的浏览器中播放,因此应该有某种方法将该数据存储到 (.wav) 文件中。我知道这是可能的,但还没有找到任何解决方案:( recorder.js 可以帮助我,但到目前为止我发现它只是记录麦克风实时输入,是否可以在帮助下记录我的音频(.wav 文件) recorder.js 的吗?请帮忙
我正在使用此示例进行录制https://github.com/mattdiamond/Recorderjs
audio-recording html5-audio webkitaudiocontext web-audio-api
我正在使用angularjs路由,但得到以下错误...
<title>Angular js</title>
</head>
<body><div data-ng-controller="SimpleController">
<div data-ng-view=""></div>
NAme:<input type="text" data-ng-model="name" />{{name}}
<br />
<ul>
<li data-ng-repeat="cust in customers|filter:name|orderBy:'city'">{{cust.name|uppercase}}-{{cust.city|lowercase}}</li>
</ul>
<script>
var demoapp = angular.module('demoapp', ['ngRoute']);
demoapp.config(function($routeprovider){
$routeprovider
.when('/',{
controller:'SimpleController',
templateUrl:'view1.html'
})
.when('/partial2',{
controller:'SimpleController',
templateUrl:'view2.html'
})
.otherwise({redirectTo:'/'});
});
demoapp.controller('SimpleController',
function ($scope) {
$scope.customers = [{ name: 'aman', city: 'boom' },
{ name: 'ajay', city: 'reem dee' },
{ name: 'hood', city: 'meen' }];
});
</script>
</div>
</body>
</html>
Run Code Online (Sandbox Code Playgroud)
控制台上的错误
Uncaught Error: [$injector:modulerr] http://errors.angularjs.org/1.2.12/$injector/modulerr?p0=demoapp&p1=Error%3…0Yb%20(http%3A%2F%2Flocalhost%3A4257%2Fscripts%2Fangular.min.js%3A32%3A232)
Run Code Online (Sandbox Code Playgroud) 我正在用Java编写一些代码,但它不起作用:
public class job
{
private static int count = 0;
private int jobID;
private String name;
private boolean isFilled;
public Job(, String title, ){
name = title;
isFilled = false;
jobID = ++count;
}
}
Run Code Online (Sandbox Code Playgroud)
我需要在创建新条目时自动增加Id.
我是谷歌Chrome扩展程序的新手.我在扩展程序中创建了一个按钮.使用该按钮,我想将用户重定向到另一个站点(如"www.example.com").我有以下代码,我为重定向编写,但它不起作用.
相关问题.
的manifest.json
{
"name": "Popup ",
"manifest_version": 2,
"version": "0.1",
"description": "Run process on page activated by click in extension popup",
"browser_action": {
"default_icon": "icon.png",
"default_popup": "popup.html"
},
"permissions": [
"tabs", "http://*/*", "https://*/*"
]
}
Run Code Online (Sandbox Code Playgroud)
popup.html
<html>
<head>
<script src="popup.js"></script>
<style type="text/css" media="screen">
body { min-width:250px; text-align: center; }
#click-me { font-size: 15px; }
</style>
</head>
<body>
<button id='click-me'>Click Me!</button>
</body>
</html>
Run Code Online (Sandbox Code Playgroud)
background.js
chrome.extension.onRequest.addListener(function(request, sender) {
chrome.tabs.update(sender.tab.id, {url: request.redirect});
});
Run Code Online (Sandbox Code Playgroud)
popup.js
function clickHandler(e) {
chrome.extension.sendRequest({redirect: "https://www.google.co.in"}); …Run Code Online (Sandbox Code Playgroud) 嗨,我正在制作谷歌Chrome扩展,并坚持错误
Uncaught TypeError: Cannot read property 'getSelected' of undefined
Run Code Online (Sandbox Code Playgroud)
我的代码如下
调用函数getQueryString(); 在if语句中创建错误
key_event.js
if (window == top) {
window.addEventListener('keyup', doKeyPress, false); //add the keyboard handler
}
trigger_key = 37;
function doKeyPress(e){
if (e.ctrlKey && e.keyCode == 37)
{
alert("leftpressed");
getQueryString();
}
else if(e.ctrlKey && e.keyCode == 39){ // if e.shiftKey is not provided then script will run at all instances of typing "G"
alert("rightpressed");
getQueryString();
}
}
function getParameterByName(name,urlPara) {
name = name.replace(/[\[]/, "\\[").replace(/[\]]/, "\\]");
var regex = new RegExp("[\\?&]" …Run Code Online (Sandbox Code Playgroud) javascript ×2
jquery ×2
ajax ×1
angularjs ×1
asp.net-mvc ×1
c# ×1
dependencies ×1
dictionary ×1
express ×1
html ×1
html5-audio ×1
java ×1
layout ×1
node.js ×1
npm ×1