blank.gif
triangle.gif http://www.hvepseeksperten.dk
Http://www.hvepseeksperten.dk

Søg efter ...
Søg

Kontakt os via email
Kontakt os

Klik her for at planlægge din rejse
Klik her

blank.gif
blank.gif
triangle.gif Du er her: /  Forsiden  /  Javascript  /  Asp-net-c-sharp    
blank.gif
blank.gif
 
arrow-headline.gif Navigation
blank.gif
home.gif
Forsiden

doc.gif  Foto Album
doc.gif  Curriculum Vita (da)
doc.gif  Tutorial
doc.gif  Design
doc.gif  Dibs
doc.gif  Firma profil
doc.gif  Her bor vi
doc.gif  Lej konsulenter
doc.gif  License
doc.gif  Mit PHP CMS
minus.gif  Javascript
    minus.gif  Asp net c sharp »»»
    doc.gif  Format date amount
    doc.gif  Full source code
    doc.gif  Request
doc.gif  Vores prisliste
doc.gif  Rejseplanen
doc.gif  Søg i google
doc.gif  Kildekoden
http://www.hvepseeksperten.dk (67)
arrow-headline.gif Artikler
 
 

Demo af følgende javascript funktionalitet

De følgende demo samples viser dig hvordan man opretter en singleton i javascript og hvordan man kan kode en dato formatter og formatere et beløb med det locale der er gældende for dit område

Demo af javascript og ASP med inklude filer

Denne kode viser dig, hvordan du kan inkludere javascript som ASP filer C# and .NET framework

Eksemplet viser hvordan man ved hjælp af javascript og ASP inklude filer med .NET framework og C# kan formatere et beløb og en dato

<%
'/**
' * Test of the *.js
' * @package javascript
' * @filesource
' * @see index.php
' * @copyright (c) http://Finn-Rasmussen.com
' * @license http://Finn-Rasmussen.com/license/ myPHP License conditions
' * @author http://Finn-Rasmussen.com
' * @version 1.10
' * @since 22-feb-2007
' */
%>
<html>
<head>
<title>Test of ASP and .NET and C# javascript include files</title>
<script type="text/javascript">
<%
'// First you must include the js - jsp files to use
%>
<!-- #include file="CountryCode.js.asp" -->
<!-- #include file="LanguageCode.js.asp" -->
<!-- #include file="Locale.js.asp" -->
<!-- #include file="DateFormat.js.asp" -->
<!-- #include file="Amount.js.asp" -->
<!-- #include file="AmountFormat.js.asp" -->
<!-- #include file="Request.js.asp" -->
<%
'// Get the current Locale
dim language
dim country
language = "da" ' Danish
country  = "DK" ' Denmark
%>
var thisLocale = Locale.getInstance('<%=language%>', '<%=country%>');
</script>
</head>
<body>
<h4>Test of javascript date and amount formatters with asp include</h4>
<p>This demo file will show you have to use the javascript asp include files</p>
<p>First you have to include the javascript js.asp files, like this:</p>
<ul><li><script type="text/javascript"
   src="/myphp-1.10/myphp-1.10-js/html/asp/CountryCode.js.asp"></script> </li></ul>
<p>Then you must create the form elements like this:</p>
<ul><li><input type="text" name="date[0]"   value="$date0"    size="10"
     maxlength="10" onblur="this.value=DateFormat.format(this.value)" /></li></ul>
<%
'// Test data
dim date0
dim date1
dim date2
dim date3
dim amount0
dim amount1
dim amount2
dim amount3

date0 = "01-01-2007"
date1 = "31-12-2007"
date2 = "11-12-2007"
date3 = "30-11-2007"
amount0 = "1,01"
amount1 = "100.001,00"
amount2 = "1.234.567,89"
amount3 = "10,00"
%>
<style type="text/css">
.AlignRight { text-align: right; }
</style>
<form name="theForm">
  <label>Paymentdate&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Amount</label><br />
  
  <input type="text" name="date[0]"   value="<%=date0%>"    
  size="10" maxlength="10" onblur="this.value=DateFormat.format(this.value)" />
  
  <input type="text" name="amount[0]" value="<%=amount0%>"  
  size="15" maxlength="40" onblur="this.value=AmountFormat.format(this.value)"
  class="AlignRight" /><br />
  
  <input type="text" name="date[1]"   value="<%=date1%>"    
  size="10" maxlength="10" onblur="this.value=DateFormat.format(this.value)" />
  
  <input type="text" name="amount[1]" value="<%=amount1%>"  
  size="15" maxlength="40" onblur="this.value=AmountFormat.format(this.value)"
  class="AlignRight" /><br />
  
  <input type="text" name="date[2]"   value="<%=date2%>"    
  size="10" maxlength="10" onblur="this.value=DateFormat.format(this.value)" />
  
  <input type="text" name="amount[2]" value="<%=amount2%>"  
  size="15" maxlength="40" onblur="this.value=AmountFormat.format(this.value)"
  class="AlignRight" /><br />
  
  <input type="text" name="date[3]"   value="<%=date3%>"    
  size="10" maxlength="10" onblur="this.value=DateFormat.format(this.value)" />
  
  <input type="text" name="amount[3]" value="<%=amount3%>"  
  size="15" maxlength="40" onblur="this.value=AmountFormat.format(this.value)"
  class="AlignRight" /><br />
</form>

<script type="text/javascript">
document.theForm['date[0]'].focus();
document.theForm['date[0]'].select();
</script>
</body>
</html>
 

triangle.gif

danmark

Germany

England

France

Italy

Norge

Sverige

USA


Opdater information
Opdatér Meta data

Opdater information
Opdatér Indhold

Login nu
Login


 
blank.gif
blank.gif
blank.gif
triangle.gif Copyright @ 1999-2008 Web Expert Finn Rasmussen Powered by myPHP Version1.10
blank.gif