https://code-boxx.com/simple-datepicker-pure-javascript-css/
function myFunction() {
var x = document.getElementById("Create");
if (x.style.display === "none") {
x.style.display = "block";
} else {
x.style.display = "none";
}
}
(lemons) ? alert("please give me a lemonade") : alert("f condition is FALSE");
if (lemons) document.write("foo gave me a bar");
lemons && document.write("foo gave me a bar");
a == 10 ? alert("true") : alert("false");
var something = (Boolean_expression) ? trueValueHardware : falseATRON;
(i === 0 ? "true" : "false")
$('.input').keypress(function (e) {
if (e.which == 13) {
$('form#login').submit();
return false; //<---- Add this line
}
});
Edit fiddle - JSFiddle - Code Playground
var div = document.getElementById('counts');
function onBlur() {
console.log("onBlur");
};
function onFocus(){
console.log("onFocus");
};
if (/*@cc_on!@*/false) { // check for Internet Explorer
div.onfocusin = onFocus;
div.onfocusout = onBlur;
} else {
div.onfocus = onFocus;
div.onblur = onBlur;
}
div.addEventListener('focus', onFocus, false); // does not work, focus does not bubble
div.addEventListener('blur', onBlur, false); // does not work, blur does not bubble
div.addEventListener('focusin', onFocus, false); // works when input is focused, as the event bubbles
div.addEventListener('focusout', onBlur, false); // works when input loose focus, as the event bubbles
function handler(event) {
console.log(event.type)
}
Планирование: setTimeout и setInterval
</ script type="text/javascript" src="http://fadak.ir/cmi/assets/jquery-3.3.1.min.js"></ /script>
</ button type=\"button\" onclick=\"ajax('#example".$row['ID']."')\">Edit example
</ script>
function ajax(form){
var data = $(form).serialize();
$.post('example_template1.php',data,function(data,status){
if(status=='success'){
alert(data);
}else{
alert('В процессе отправки произошла ошибка :(');
}
})
}
</ /script>
$.ajax, $.get, $.post, $.getScript, $.getJson differences in jquery
$.ajax() Performs an asynchronous HTTP (Ajax) request basically this is a method of jquery which internally uses xmlhttprequest object of JavaScript as asynchronous communicator which supports cross browser also.
There is lots of confusion in some of the function of jquery like $.ajax, $.get, $.post, $.getScript, $.getJSON that what is the difference among them which is the best, which is the fast, which to use and when so below is the description of them to make them clear and to get rid of this type of confusions.
$.get() function is a shorthand Ajax function, which is equivalent to below expression, Uses some limited criteria like Request type is GET. In $.get() function there is no any error callback only you can track succeed callback and there no standard setting supported like beforeSend, statusCode, mimeType etc, if you want to customize use $.ajax().
get: function(url, data, callback, type) {
if ($.isFunction(data)) {
callback = data;
data = null;
}
return $.ajax({
type: "GET",
url: url,
data: data,
success: callback,
dataType: type
});
}
$.post() function is a shorthand Ajax function, which is equivalent to below expression, Uses some limited criteria like Request type is POST. In $.post() function there is also no any error callback only you can track succeed callback and there no standard setting supported like beforeSend, statusCode, mimeType etc, if you want it use $.ajax().
post: function(url, data, callback, type) {
if ($.isFunction(data)) {
callback = data;
data = {};
}
return $.ajax({
type: "POST",
url: url,
data: data,
success: callback,
dataType: type
});
}
$.getScript() function is a shorthand Ajax function (internally use $.get() with data type JSON), which is equivalent to below expression, Uses some limited criteria like Request type is GET and data Type is script.
$.getJSON() function is a shorthand Ajax function (internally use $.get() with data type script), which is equivalent to below expression, Uses some limited criteria like Request type is GET and data Type is json.getScript: function(url, callback) {
return $.get(url, null, callback, "script");
}
getJSON: function(url, data, callback) {
return $.get(url, data, callback, "json");
}And in both of the function ($.getScript(), $.getJSON()) there is also no any error callback only you can track succeed callback and there no standard setting supported like beforeSend, statusCode, mimeType etc, if you want it use $.ajax().
</input type="text" onkeyup="showHint(this.value)"/>
</span id="txtHint"></span/>
</script/>
function showHint(str) {
xhttp = new XMLHttpRequest();
xhttp.onreadystatechange = function() {
if (this.readyState == 4 && this.status == 200) {
document.getElementById("txtHint").innerHTML = this.responseText;
}
};
xhttp.open("GET", "gethint.php?q="+str, true);
xhttp.send();
}
</script/>
XMLHttpRequest POST, формы и кодировка
form serialize javascript (no framework) - Stack Overflow
Online Interactive JavaScript (JS) Cheat Sheet
ECMAScript® 2019 Language Specification
Eloquent JavaScript
JSON.stringify() - JavaScript | MDN
JavaScript Tester online
Online Javascript Editor
JSFiddle - Code Playground
WYSIWYG HTML Editor with Collaborative Rich Text Editing
NuGet Gallery | TinyMCE 5.10.2
TinyMCE is a platform independent web based Javascript HTML WYSIWYG editor control released as Open Source under LGPL.
TinyMCE | Add Plugins to TinyMCE
These are the shortcuts currently in TinyMCE:
(ctrl on Mac = cmd)
Add this style for remove messages:
<//style>
.tox-statusbar__branding {display:none!important;}
.tox-notifications-container {display:none!important;}
<///style>
Add right to left in 5.x
<//script>
tinymce.init({selector:'textarea',
plugins: "directionality",
toolbar: "ltr rtl alignleft aligncenter alignright alignjustify",
file_picker_callback: function (callback, value, meta) {
browseFiles(value, meta.filetype, function (fileUrl) {
callback(fileUrl);
});
}
});
<///script>
Example
<///!DOCTYPE html>
<///html>
<///style>
.tox-statusbar__branding {display:none!important;}
.tox-notifications-container {display:none!important;}
<///style>
<//head>
<///script src='tinymce.min.js'>
<///script>
tinymce.init({
selector: '#texta',
//doctype : "<///html dir=rtl>",
spellchecker_language: "fa",
height: 600,
browser_spellcheck: true,
content_css: 'editor.css',
plugins: "paste directionality code searchreplace lists advlist wordcount table link image spellchecker",
toolbar: "formatselect|link unlink image|bullist numlist|ltr alignjustify rtl|code",
contextmenu: false,
});
<///script>
<///head>
<///textarea id="texta" name="mytextarea"><///textarea>
Scalable Vector Graphics (SVG)
D3JS Wiki
Gallery D3 Wiki
D3. GitHub stars: 79,937. D3
React-vis. GitHub stars: 4,612
Chart. js. GitHub stars: 40,141
VX. GitHub stars: 5,263
Rechart. GitHub stars: 10,229
ArcGIS API for JavaScript | ArcGIS for Developers
Online jQuery Cheat Sheet
javascript - Invoke a callback at the end of a transition - Stack Overflow
D3.js Playground
Stacked-to-Grouped Bars / D3 / Observable
D3.js - Fullstack D3 and Data Visualization
Useful JQuery, D3.js and AngularJS Cheat-Sheets (HD) - Codemio - A Software Developer's Blog
D3js Cheatsheet
How to create jaw dropping Data Visualizations on the web with D3.js?
D3.js vs NumPy vs Pandas | What are the differences?
SVG Group Element and D3.js | DashingD3js.com
Введение в d3.js | Frontender Magazine
bar chart with D3.js - JSFiddle
D3.js Tutorial: Building Interactive Bar Charts with JavaScript | @RisingStack
D3.js 5 documentation — DevDocs
D3.js - Data-Driven Documents
Scrimba - Playlist D3.js tutorial series
Bar Chart in D3 v5 - bl.ocks.org
Data Visualization - List of D3 Examples - 2018
Creating a simple bar chart
Learn D3.js for free | Scrimba.com
d3noob’s Blocks - bl.ocks.org
آموزش D3.js
آموزش D3 - دریافت دادهها - لایو گوگل
آموزش D3 - کلیات - لایو گوگل
Mike Bostock’s Blocks - bl.ocks.org
Basic Chart - Grouped Bar Chart | DashingD3js.com
D3.js Axis API
Create Axes in D3.js
Plunker
Comparison of JavaScript charting libraries
Bar Chart in D3 v5 - bl.ocks.org
آموزش D3.js
Learn D3.js in 5 minutes – freeCodeCamp.org
Learn D3.js for free | Scrimba.com
d3.treemap() non hierarchical data - JSFiddle
D3.js - методы получения внешних данных - YouTube
D3.js tutorial - 10 - Loading External Data - YouTube
انواع نمودارها (1) - جادوبی
آموزش D3 - کلیات - لایو گوگل
D3 Tutorial Table of Contents | DashingD3js.com
jQuery Cheat Sheet
jQuery Cheat Sheet | OverAPI.com
Top 10 jQuery Cheat Sheet - TemplateToaster Blog
Online jQuery Cheat Sheet
mbeaudru/modern-js-cheatsheet: Cheatsheet for the JavaScript knowledge you will frequently encounter in modern projects.
Attribute | jQuery API Documentation
$('td[name="tcol1"]') // Matches exactly 'tcol1'
$('td[name^="tcol"]' ) // Matches those that begin with 'tcol'
$('td[name$="tcol"]' ) // Matches those that end with 'tcol'
$('td[name*="tcol"]' ) // Matches those that contain 'tcol'
Use this JavaScript code (with jQuery) (I'm trying to make it simple but you'll do better if you learn well) :
// To get the content from a single HTML tag
var theID = "predefined";
var theContent = $("#" + theID).text(); // Or .html() if you want the whole content
// To POST the extracted content to your PHP page in order to write to your mySQL db
$.ajax({
type: "POST",
url: "http://www.myapp.com/mypage.php",
data: { id: theID, content: theContent },
success: function(response){ // just in case you need a response from your PHP stuff
alert(response);
}
});
jspreadsheets - Best JavaScript Data Grids and Spreadsheets for React, Angular, Vue and Svelte.
Grider - Grider is a jQuery plugin to simplify the Master details forms
ngReactGrid - Best JavaScript Data Grids and Spreadsheets for React, Angular, Vue and Svelte.
Importabular : 5kb javascript spreadsheet component
jalali-date-picker · GitHub Topics · GitHub
XMLHttpRequest.send() - Web APIs | MDN
javascript - Send POST data using XMLHttpRequest - Stack Overflow
jquery - AJAX Post Implementation in Pure Javascript - Stack Overflow
Get all Elements in a Form using JavaScript | bobbyhadz
php - Alternative to jQuery's serialize()? - Stack Overflow
jquery - AJAX Post Implementation in Pure Javascript - Stack Overflow
قطعه کد چک صحت کد ملی در Java Script
//function checkCodeMeli(code)
//{
//
// var L=code.length;
// if(L<8 || parseInt(code,10)==0) return false;
// code=('0000'+code).substr(L+4-10);
// if(parseInt(code.substr(3,6),10)==0) return false;
// var c=parseInt(code.substr(9,1),10);
// var s=0;
// for(var i=0;i<9;i++)
// s+=parseInt(code.substr(i,1),10)*(10-i);
// s=s%11;
// return (s<2 && c==s) || (s>=2 && c==(11-s));
// return true;
// }