问题描述
我尝试了什么:
我正在尝试编写一个从本地存储添加值的html页面并在jsgrid上显示它(轻量级网格jQuery插件 - jsGrid [^])包括排序。但我无法做到。网格本身未显示在网页上。任何人都可以帮助我
这是我试过的代码,任何人都可以告诉我如何添加jsgrid代码,以接受本地存储和排序后显示。
What I have tried:
I am trying to write an html page that add values from local storage and show it on jsgrid(Lightweight Grid jQuery Plugin - jsGrid[^]) including sorting . but i am not able do it. the grid itself is not showing on the web page. can any one help me
this is the code which i tried can any one can please tell me how to add jsgrid code to it to accept the value from local storage and show it after sorting.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>DATA MANAGER</title>
<meta name="description" content="Hello World">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css"
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap-theme.min.css">
<link type="text/css" rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/jsgrid/1.4.1/jsgrid.min.css" />
<link type="text/css" rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/jsgrid/1.4.1/jsgrid-theme.min.css" />
<link type="text/css" rel="stylesheet" href="jsgrid.min.css" />
<link type="text/css" rel="stylesheet" href="jsgrid-theme.min.css" />
<style>
.blue
{
background-color: #428BCA;
padding: 10px;
}
.heading
{
padding: 10px;
}
.form
{
padding: 20;
}
</style>
<script>
function save()
{
var v1=document.getElementById('email').value;
var v2=document.getElementById('username').value;
var v3=document.getElementById('age').value;
localStorage.setItem('email',v1);
localStorage.setItem('username',v2);
localStorage.setItem('age',v3);
}
</script>
</head>
<body>
<header>
</header>
<div class="blue">
<div class="container">
<div class="heading text-center"><h2>SAVAD'S DATA MANAGER TASK</h2></div>
</div>
</div>
<br><br><br><br><br><br>
<div style="width:1250px; margin:0 auto;">
<h1>Enter Details</h1>
</div>
<div class = "col-md-6 text-left">
<!-- Content goes here -->
<form>
<fieldset class="form-group">
<div class="col-xs-10">
<label for="email">Enter Email Address</label>
<input type="email" class="form-control input-lg" id="email" placeholder="emailAddress" >
<label for="username">Enter username</label>
<input type="username" class="form-control input-lg" id="username" placeholder="username" >
<label for="age">Enter Age</label>
<input type="age"class="form-control input-lg" id="age" placeholder="age" >
<br>
<input type="button" value="save" />
</div>
</fieldset>
</form>
<h1>col1</h1>
</div>
<div class = "col-md-6 text-left">
<!-- Content goes here -->
<h1>col2</h1>
<div id="jsGrid">
</div>
</div>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jsgrid/1.4.1/jsgrid.min.js"></script>
<script src="http://code.jquery.com/jquery-2.1.1.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jsgrid/1.4.1/jsgrid.min.js"></script>
</body>
</html>
我尝试了什么:
我正在尝试编写一个增加值的html页面本地存储并在jsgrid上显示( [])包括排序。但我无法做到。网格本身未显示在网页上。任何人都可以帮助我
这是我试过的代码,任何人都可以告诉我如何添加jsgrid代码,以接受本地存储和排序后显示它
What I have tried:
I am trying to write an html page that add values from local storage and show it on jsgrid(Lightweight Grid jQuery Plugin - jsGrid[^]) including sorting . but i am not able do it. the grid itself is not showing on the web page. can any one help me
this is the code which i tried can any one can please tell me how to add jsgrid code to it to accept the value from local storage and show it after sorting
推荐答案
<!DOCTYPE html>
`。 jsgrid不支持`
` from your code. jsgrid will not support `
<!DOCTYPE html>
`。
这篇关于我的jsgrid没有在HTML页面上显示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!